1
0
mirror of https://github.com/sharkdp/fd synced 2024-06-29 06:14:26 +00:00

Merge pull request #1541 from tavianator/clippy-is-empty

filesystem: Remove a redundant as_str()
This commit is contained in:
Thayne McCombs 2024-04-28 20:22:10 -06:00 committed by GitHub
commit 8eb047945e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,7 +128,7 @@ pub fn strip_current_dir(path: &Path) -> &Path {
pub fn default_path_separator() -> Option<String> {
if cfg!(windows) {
let msystem = env::var("MSYSTEM").ok()?;
if !msystem.as_str().is_empty() {
if !msystem.is_empty() {
return Some("/".to_owned());
}
}