Fix a bunch of other low-hanging style lints (#36498)
- **Fix a bunch of low hanging style lints like unnecessary-return** - **Fix single worktree violation** - **And the rest** Release Notes: - N/A
This commit is contained in:
parent
df9c2aefb1
commit
05fc0c432c
239 changed files with 854 additions and 1015 deletions
|
@ -54,7 +54,7 @@ impl AssertionsReport {
|
|||
pub fn passed_count(&self) -> usize {
|
||||
self.ran
|
||||
.iter()
|
||||
.filter(|a| a.result.as_ref().map_or(false, |result| result.passed))
|
||||
.filter(|a| a.result.as_ref().is_ok_and(|result| result.passed))
|
||||
.count()
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ fn main() {
|
|||
let telemetry = app_state.client.telemetry();
|
||||
telemetry.start(system_id, installation_id, session_id, cx);
|
||||
|
||||
let enable_telemetry = env::var("ZED_EVAL_TELEMETRY").map_or(false, |value| value == "1")
|
||||
let enable_telemetry = env::var("ZED_EVAL_TELEMETRY").is_ok_and(|value| value == "1")
|
||||
&& telemetry.has_checksum_seed();
|
||||
if enable_telemetry {
|
||||
println!("Telemetry enabled");
|
||||
|
|
|
@ -70,10 +70,10 @@ impl Example for AddArgToTraitMethod {
|
|||
let path_str = format!("crates/assistant_tools/src/{}.rs", tool_name);
|
||||
let edits = edits.get(Path::new(&path_str));
|
||||
|
||||
let ignored = edits.map_or(false, |edits| {
|
||||
let ignored = edits.is_some_and(|edits| {
|
||||
edits.has_added_line(" _window: Option<gpui::AnyWindowHandle>,\n")
|
||||
});
|
||||
let uningored = edits.map_or(false, |edits| {
|
||||
let uningored = edits.is_some_and(|edits| {
|
||||
edits.has_added_line(" window: Option<gpui::AnyWindowHandle>,\n")
|
||||
});
|
||||
|
||||
|
@ -89,7 +89,7 @@ impl Example for AddArgToTraitMethod {
|
|||
let batch_tool_edits = edits.get(Path::new("crates/assistant_tools/src/batch_tool.rs"));
|
||||
|
||||
cx.assert(
|
||||
batch_tool_edits.map_or(false, |edits| {
|
||||
batch_tool_edits.is_some_and(|edits| {
|
||||
edits.has_added_line(" window: Option<gpui::AnyWindowHandle>,\n")
|
||||
}),
|
||||
"Argument: batch_tool",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue