File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ fn strip_verbatim_from_prefix(prefix: &PrefixComponent<'_>) -> Option<PathBuf> {
53
53
#[ derive( Debug ) ]
54
54
struct RemoveError {
55
55
kind : std:: io:: ErrorKind ,
56
- path : String ,
56
+ path : PathBuf ,
57
57
}
58
58
59
59
impl std:: error:: Error for RemoveError { }
@@ -62,7 +62,8 @@ impl std::fmt::Display for RemoveError {
62
62
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
63
63
f. write_fmt ( format_args ! (
64
64
"failed to remove '{}' : {:?}" ,
65
- self . path, self . kind
65
+ self . path. display( ) ,
66
+ self . kind
66
67
) )
67
68
}
68
69
}
@@ -72,7 +73,7 @@ pub(crate) fn improve_remove_error(error: std::io::Error, path: &Path) -> std::i
72
73
error. kind ( ) ,
73
74
RemoveError {
74
75
kind : error. kind ( ) ,
75
- path : path. display ( ) . to_string ( ) ,
76
+ path : path. to_path_buf ( ) ,
76
77
} ,
77
78
)
78
79
}
You can’t perform that action at this time.
0 commit comments