File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed
Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change 1- use std:: fmt:: { self , Display } ;
2- use std:: path:: { Path , PathBuf } ;
1+ use std:: fmt:: Display ;
2+ use std:: path:: { self , Path , PathBuf } ;
33
44#[ doc( hidden) ]
55pub trait AsDisplay < ' a > {
@@ -20,29 +20,19 @@ where
2020}
2121
2222impl < ' a > AsDisplay < ' a > for Path {
23- type Target = PathDisplay < ' a > ;
23+ type Target = path :: Display < ' a > ;
2424
2525 #[ inline]
2626 fn as_display ( & ' a self ) -> Self :: Target {
27- PathDisplay ( self )
27+ self . display ( )
2828 }
2929}
3030
3131impl < ' a > AsDisplay < ' a > for PathBuf {
32- type Target = PathDisplay < ' a > ;
32+ type Target = path :: Display < ' a > ;
3333
3434 #[ inline]
3535 fn as_display ( & ' a self ) -> Self :: Target {
36- PathDisplay ( self . as_path ( ) )
37- }
38- }
39-
40- #[ doc( hidden) ]
41- pub struct PathDisplay < ' a > ( & ' a Path ) ;
42-
43- impl < ' a > Display for PathDisplay < ' a > {
44- #[ inline]
45- fn fmt ( & self , formatter : & mut fmt:: Formatter ) -> fmt:: Result {
46- self . 0 . display ( ) . fmt ( formatter)
36+ self . display ( )
4737 }
4838}
You can’t perform that action at this time.
0 commit comments