Skip to content

Commit ba4a1e7

Browse files
committed
ci: Fix clippy errors
1 parent 3096661 commit ba4a1e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils/formatting.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)