File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ impl Display for EscapedPathDisplay<'_> {
4545/// This is different from [`Path::display`].
4646///
4747/// See <https://gist.github.com/marcospb19/ebce5572be26397cf08bbd0fd3b65ac1> for a comparison.
48- pub fn path_to_str ( path : & Path ) -> Cow < str > {
48+ pub fn path_to_str ( path : & Path ) -> Cow < ' _ , str > {
4949 os_str_to_str ( path. as_ref ( ) )
5050}
5151
52- pub fn os_str_to_str ( os_str : & OsStr ) -> Cow < str > {
52+ pub fn os_str_to_str ( os_str : & OsStr ) -> Cow < ' _ , str > {
5353 let format = || {
5454 let text = format ! ( "{os_str:?}" ) ;
5555 Cow :: Owned ( text. trim_matches ( '"' ) . to_string ( ) )
@@ -83,7 +83,7 @@ pub fn pretty_format_list_of_paths(paths: &[impl AsRef<Path>]) -> String {
8383}
8484
8585/// Display the directory name, but use "current directory" when necessary.
86- pub fn nice_directory_display ( path : & Path ) -> Cow < str > {
86+ pub fn nice_directory_display ( path : & Path ) -> Cow < ' _ , str > {
8787 if path == Path :: new ( "." ) {
8888 Cow :: Borrowed ( "current directory" )
8989 } else {
You can’t perform that action at this time.
0 commit comments