simplify Fid/Sid stringification
This commit is contained in:
parent
1dc7f743b0
commit
f9a075b922
1 changed files with 2 additions and 6 deletions
|
@ -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),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue