Skip to content

Commit c695284

Browse files
committed
fix warns/clippy problems
1 parent e27b7ca commit c695284

10 files changed

Lines changed: 427 additions & 142 deletions

File tree

Cargo.lock

Lines changed: 6 additions & 90 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ crossbeam-channel = "0.5.15"
1818
serde = { version = "1.0.228", features = ["derive"] }
1919
serde_json = "1.0.149"
2020
rfd = "0.17.2"
21-
egui_extras = "0.34.1"
21+
egui_extras = { version = "0.34.1", default-features = false }
2222
image = { version = "0.25.10", default-features = false, features = ["png"] }
2323
arboard = "3.6.1"
2424
openh264 = "0.9"

src/adb/emulator.rs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,9 @@ fn emulator_path() -> Option<PathBuf> {
3434
}
3535

3636
// Homebrew on macOS installs emulator directly into its bin directory.
37-
for candidate in homebrew_tool_candidates("emulator") {
38-
if candidate.exists() {
39-
return Some(candidate);
40-
}
41-
}
42-
43-
None
37+
homebrew_tool_candidates("emulator")
38+
.into_iter()
39+
.find(|candidate| candidate.exists())
4440
}
4541

4642
/// List available AVDs.
@@ -91,11 +87,11 @@ fn list_avds_from_directory() -> Vec<String> {
9187
};
9288

9389
entries
94-
.filter_map(|e| e.ok())
90+
.filter_map(Result::ok)
9591
.filter_map(|e| {
9692
let name = e.file_name();
9793
let name = name.to_string_lossy();
98-
name.strip_suffix(".ini").map(|n| n.to_string())
94+
name.strip_suffix(".ini").map(ToString::to_string)
9995
})
10096
.collect()
10197
}
@@ -241,13 +237,9 @@ fn avdmanager_path() -> Option<PathBuf> {
241237
}
242238

243239
// Homebrew on macOS.
244-
for candidate in homebrew_tool_candidates("avdmanager") {
245-
if candidate.exists() {
246-
return Some(candidate);
247-
}
248-
}
249-
250-
None
240+
homebrew_tool_candidates("avdmanager")
241+
.into_iter()
242+
.find(|candidate| candidate.exists())
251243
}
252244

253245
/// List available system images for AVD creation.

0 commit comments

Comments
 (0)