mirror of
https://github.com/uuid-rs/uuid.git
synced 2025-09-29 22:10:50 +00:00
always use hyphenated format regardless of flags
This commit is contained in:
parent
52197cd275
commit
e7eaf5b4a2
12
src/fmt.rs
12
src/fmt.rs
@ -42,22 +42,14 @@ impl fmt::Display for Variant {
|
||||
|
||||
impl fmt::LowerHex for Uuid {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
if f.alternate() {
|
||||
fmt::LowerHex::fmt(self.as_simple(), f)
|
||||
} else {
|
||||
fmt::LowerHex::fmt(self.as_hyphenated(), f)
|
||||
}
|
||||
fmt::LowerHex::fmt(self.as_hyphenated(), f)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::UpperHex for Uuid {
|
||||
#[inline]
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
if f.alternate() {
|
||||
fmt::UpperHex::fmt(self.as_simple(), f)
|
||||
} else {
|
||||
fmt::UpperHex::fmt(self.as_hyphenated(), f)
|
||||
}
|
||||
fmt::UpperHex::fmt(self.as_hyphenated(), f)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user