Skip to content
Myr

Merge pull request #1772 from sharkdp/fix-clippy-lifetime-elision

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thayne McCombs · committed by GitHub · parents d856e78, 6778232 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • filesystem: Fix a clippy warning about lifetime elision

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:src/filesystem.rs+2 added-2 removed
98 unmodified lines
99 false100}101102#[cfg(any(unix, target_os = "redox"))]103pub fn osstr_to_bytes(input: &OsStr) -> Cow<[u8]> {103pub fn osstr_to_bytes(input: &OsStr) -> Cow<'_, [u8]> {104 use std::os::unix::ffi::OsStrExt;105 Cow::Borrowed(input.as_bytes())106}107108#[cfg(windows)]109pub fn osstr_to_bytes(input: &OsStr) -> Cow<[u8]> {109pub fn osstr_to_bytes(input: &OsStr) -> Cow<'_, [u8]> {110 let string = input.to_string_lossy();111112 match string {113 Cow::Owned(string) => Cow::Owned(string.into_bytes()),
43 unmodified lines