make list use Option
This commit is contained in:
parent
3122f68720
commit
398615573c
1 changed files with 3 additions and 3 deletions
|
|
@ -1,16 +1,16 @@
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct ListCommand {
|
pub struct ListCommand {
|
||||||
uuids: bool
|
uuids: Option<bool>
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ListCommand {
|
impl ListCommand {
|
||||||
pub fn uuids(mut self) -> Self {
|
pub fn uuids(mut self) -> Self {
|
||||||
self.uuids = true;
|
self.uuids = Some(true);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build(self) -> super::Command {
|
pub fn build(self) -> super::Command {
|
||||||
let uuids = self.uuids;
|
let uuids = self.uuids.unwrap_or(false);
|
||||||
let mut s = format!("list");
|
let mut s = format!("list");
|
||||||
if uuids {
|
if uuids {
|
||||||
s.push_str(" uuids");
|
s.push_str(" uuids");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue