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
1 changed files with 1 additions and 1 deletions

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());
}
}