1
Fork 0
mirror of https://github.com/RGBCube/dix synced 2025-07-27 03:37:45 +00:00

fix: use Self and don't depend on nightly features

This commit is contained in:
RGBCube 2025-05-09 18:05:54 +03:00 committed by bloxx12
parent 60d7a4d9ae
commit f4357e1c50
2 changed files with 5 additions and 4 deletions

View file

@ -35,9 +35,9 @@ enum DiffStatus {
impl DiffStatus {
fn char(self) -> impl fmt::Display {
match self {
DiffStatus::Added => "A".green(),
DiffStatus::Removed => "R".red(),
DiffStatus::Changed => "C".yellow(),
Self::Added => "A".green(),
Self::Removed => "R".red(),
Self::Changed => "C".yellow(),
}
}
}

View file

@ -41,7 +41,8 @@ fn path_to_canonical_string(path: &Path) -> Result<String> {
let path = path.into_os_string().into_string().map_err(|path| {
anyhow!(
"failed to convert path '{path}' to valid unicode",
path = path.display(),
path = Path::new(&*path).display(), /* TODO: use .display() directly
* after Rust 1.87.0 in flake. */
)
})?;