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:
parent
60d7a4d9ae
commit
f4357e1c50
2 changed files with 5 additions and 4 deletions
|
@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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. */
|
||||
)
|
||||
})?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue