Fix clippy::len_zero lint style violations (#36589)

Related: #36577

Release Notes:

- N/A

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
This commit is contained in:
Umesh Yadav
2025-08-20 14:35:59 +00:00
committed by GitHub
parent 92352f97ad
commit 1e6cefaa56
24 changed files with 46 additions and 46 deletions
+3 -4
View File
@@ -1113,9 +1113,8 @@ impl RunningState {
};
let session = self.session.read(cx);
let cwd = Some(&request.cwd)
.filter(|cwd| cwd.len() > 0)
.map(PathBuf::from)
let cwd = (!request.cwd.is_empty())
.then(|| PathBuf::from(&request.cwd))
.or_else(|| session.binary().unwrap().cwd.clone());
let mut envs: HashMap<String, String> =
@@ -1150,7 +1149,7 @@ impl RunningState {
} else {
None
}
} else if args.len() > 0 {
} else if !args.is_empty() {
Some(args.remove(0))
} else {
None