Skip to content

Commit

Permalink
style: Change len() == 0 to is_empty()
Browse files Browse the repository at this point in the history
  • Loading branch information
Pr0methean committed Jun 13, 2024
1 parent 057224f commit 68f0a2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ pub(crate) fn is_dir(filename: &str) -> bool {
pub(crate) fn path_to_string<T: AsRef<Path>>(path: T) -> Box<str> {
let mut maybe_original = None;
if let Some(original) = path.as_ref().to_str() {
if original.len() == 0 {
if original.is_empty() {
return String::new().into_boxed_str();
}
if (MAIN_SEPARATOR == '/' || !original[1..].contains(MAIN_SEPARATOR))
Expand Down

0 comments on commit 68f0a2f

Please sign in to comment.