oops, remove unnecessary -o
This commit is contained in:
parent
c2aeb5ac96
commit
43bc194f25
1 changed files with 5 additions and 2 deletions
|
@ -876,7 +876,7 @@ impl Display for Mount {
|
||||||
write!(f, "mount")?;
|
write!(f, "mount")?;
|
||||||
|
|
||||||
if !self.options.is_empty() {
|
if !self.options.is_empty() {
|
||||||
write!(f, " -o {}", self.options)?;
|
write!(f, " {}", self.options)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
write!(f, " {}", self.source)?;
|
write!(f, " {}", self.source)?;
|
||||||
|
@ -1260,12 +1260,15 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn mount_display() {
|
fn mount_display() {
|
||||||
let mnt = Mount::new(
|
let mut mnt = Mount::new(
|
||||||
DeviceId::Label("awawa".into()),
|
DeviceId::Label("awawa".into()),
|
||||||
"/mnt",
|
"/mnt",
|
||||||
MountOptions::default(),
|
MountOptions::default(),
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(mnt.to_string(), "mount LABEL=awawa /mnt");
|
assert_eq!(mnt.to_string(), "mount LABEL=awawa /mnt");
|
||||||
|
|
||||||
|
mnt.options.push(MountOption::All);
|
||||||
|
assert_eq!(mnt.to_string(), "mount --all LABEL=awawa /mnt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue