mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
option_parser: add add_all_valueless() helper
Helpful to prevent repetitions. On-behalf-of: Philipp Schuster@sap.com Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
fcfae4cc4b
commit
a56f49787c
@@ -2141,10 +2141,7 @@ impl ConsoleConfig {
|
||||
pub fn parse(console: &str) -> Result<Self> {
|
||||
let mut parser = OptionParser::new();
|
||||
parser
|
||||
.add_valueless("off")
|
||||
.add_valueless("pty")
|
||||
.add_valueless("tty")
|
||||
.add_valueless("null")
|
||||
.add_all_valueless(&["off", "pty", "tty", "null"])
|
||||
.add("file")
|
||||
.add("iommu")
|
||||
.add("socket");
|
||||
|
||||
Reference in New Issue
Block a user