simplify Fid/Sid stringification

This commit is contained in:
Smitty 2021-05-29 11:38:22 -04:00
parent 1dc7f743b0
commit f9a075b922

View file

@ -75,9 +75,7 @@ impl ToString for Fid {
/// Display the ID as it would be in a URI. /// Display the ID as it would be in a URI.
#[must_use] #[must_use]
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { format!("{}-F{}", self.0, self.1)
Fid(Lid(lid), fid) => format!("L{}-F{}", lid, fid),
}
} }
} }
@ -85,9 +83,7 @@ impl ToString for Sid {
/// Display the ID as it would be in a URI. /// Display the ID as it would be in a URI.
#[must_use] #[must_use]
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { format!("{}-S{}", self.0, self.1)
Sid(Lid(lid), sid) => format!("L{}-S{}", lid, sid),
}
} }
} }