From 0b833ea9c06058bd4d540ef9edbe04c70bfbb89a Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Sat, 6 Apr 2024 00:37:52 +0900 Subject: [PATCH] repo_path: qualify fmt::Error, use fmt::Result for short "Error" is super common type name, so I think better to not pollute the namespace with a very specific Error type. --- lib/src/repo_path.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/repo_path.rs b/lib/src/repo_path.rs index 542b1ad6d..82ba63e0a 100644 --- a/lib/src/repo_path.rs +++ b/lib/src/repo_path.rs @@ -16,7 +16,7 @@ use std::borrow::Borrow; use std::cmp::Ordering; -use std::fmt::{Debug, Error, Formatter}; +use std::fmt::{self, Debug, Formatter}; use std::iter::FusedIterator; use std::ops::Deref; use std::path::{Component, Path, PathBuf}; @@ -172,13 +172,13 @@ pub struct RepoPath { } impl Debug for RepoPath { - fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { f.write_fmt(format_args!("{:?}", &self.value)) } } impl Debug for RepoPathBuf { - fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { ::fmt(self, f) } }