impl for borrowed types
This commit is contained in:
parent
90cf6ef934
commit
d1377270fb
1 changed files with 12 additions and 0 deletions
|
@ -7,6 +7,18 @@ macro_rules! impl_os_from_str {
|
|||
f.write_str(&self.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl $crate::OsDisplay for &$type {
|
||||
fn fmt_os(&self, f: &mut OsStringFormatter) -> std::fmt::Result {
|
||||
(**self).fmt_os(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl $crate::OsDisplay for &mut $type {
|
||||
fn fmt_os(&self, f: &mut OsStringFormatter) -> std::fmt::Result {
|
||||
(**self).fmt_os(f)
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue