Don't show staged value if flag is RO
Bug: 324436145 Change-Id: I493421f29d6e7f5e844dd47cc6417b3d5fe9cdbb Test: m aflags && aflags list
This commit is contained in:
@@ -116,9 +116,10 @@ impl Flag {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn display_staged_value(&self) -> String {
|
fn display_staged_value(&self) -> String {
|
||||||
match self.staged_value {
|
match (&self.permission, self.staged_value) {
|
||||||
Some(v) => format!("(->{})", v),
|
(FlagPermission::ReadOnly, _) => "-".to_string(),
|
||||||
None => "-".to_string(),
|
(FlagPermission::ReadWrite, None) => "-".to_string(),
|
||||||
|
(FlagPermission::ReadWrite, Some(v)) => format!("(->{})", v),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user