Skip to main content

yazi_shared/path/
display.rs

1use crate::path::PathDyn;
2
3pub struct Display<'a>(pub PathDyn<'a>);
4
5impl std::fmt::Display for Display<'_> {
6	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7		match self.0 {
8			PathDyn::Os(p) => write!(f, "{}", p.display()),
9			PathDyn::Unix(p) => write!(f, "{}", p.display()),
10		}
11	}
12}