mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-24 21:57:41 +00:00
Refactor: Remove unnecessary parentheses in if condition (#566)
This commit is contained in:
parent
2c7e01cd62
commit
7e21f5c6b6
@ -147,7 +147,7 @@ fn truncate(dir_string: String, length: usize) -> String {
|
|||||||
let mut components = dir_string.split('/').collect::<Vec<&str>>();
|
let mut components = dir_string.split('/').collect::<Vec<&str>>();
|
||||||
|
|
||||||
// If the first element is "" then there was a leading "/" and we should remove it so we can check the actual count of components
|
// If the first element is "" then there was a leading "/" and we should remove it so we can check the actual count of components
|
||||||
if (components[0] == "") {
|
if components[0] == "" {
|
||||||
components.remove(0);
|
components.remove(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user