oops, remove unnecessary -o

This commit is contained in:
Rowan 2025-03-05 20:01:18 -06:00
parent c2aeb5ac96
commit 43bc194f25

View file

@ -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");
} }
} }