File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ struct Bash;
126
126
127
127
impl UnixShell for Bash {
128
128
fn does_exist ( & self ) -> bool {
129
- self . update_rcs ( ) . len ( ) > 0
129
+ ! self . update_rcs ( ) . is_empty ( )
130
130
}
131
131
132
132
fn rcfiles ( & self ) -> Vec < PathBuf > {
@@ -155,15 +155,15 @@ impl Zsh {
155
155
156
156
if matches ! ( process( ) . var( "SHELL" ) , Ok ( sh) if sh. contains( "zsh" ) ) {
157
157
match process ( ) . var ( "ZDOTDIR" ) {
158
- Ok ( dir) if dir. len ( ) > 0 => Ok ( PathBuf :: from ( dir) ) ,
158
+ Ok ( dir) if ! dir. is_empty ( ) => Ok ( PathBuf :: from ( dir) ) ,
159
159
_ => bail ! ( "Zsh setup failed." ) ,
160
160
}
161
161
} else {
162
162
match std:: process:: Command :: new ( "zsh" )
163
163
. args ( & [ "-c" , "'echo $ZDOTDIR'" ] )
164
164
. output ( )
165
165
{
166
- Ok ( io) if io. stdout . len ( ) > 0 => Ok ( PathBuf :: from ( OsStr :: from_bytes ( & io. stdout ) ) ) ,
166
+ Ok ( io) if ! io. stdout . is_empty ( ) => Ok ( PathBuf :: from ( OsStr :: from_bytes ( & io. stdout ) ) ) ,
167
167
_ => bail ! ( "Zsh setup failed." ) ,
168
168
}
169
169
}
You can’t perform that action at this time.
0 commit comments