Sha256: 63c492bfa8b8e9180ad5abcbe63c1173b4ad490c47ec33cac9a338f96c8f8e42
Contents?: true
Size: 526 Bytes
Versions: 11
Compression:
Stored size: 526 Bytes
Contents
use std::fmt::Display; use std::path::{self, Path, PathBuf}; pub trait DisplayAsDisplay { fn as_display(&self) -> Self; } impl<T: Display> DisplayAsDisplay for &T { fn as_display(&self) -> Self { self } } pub trait PathAsDisplay { fn as_display(&self) -> path::Display<'_>; } impl PathAsDisplay for Path { fn as_display(&self) -> path::Display<'_> { self.display() } } impl PathAsDisplay for PathBuf { fn as_display(&self) -> path::Display<'_> { self.display() } }
Version data entries
11 entries across 11 versions & 1 rubygems