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:
Piotr Osiewicz 2025-08-19 21:26:17 +02:00 committed by GitHub
parent df9c2aefb1
commit 05fc0c432c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
239 changed files with 854 additions and 1015 deletions

View file

@ -94,9 +94,7 @@ impl<'a, S: Summary, D: Dimension<'a, S> + Ord> SeekTarget<'a, S, D> for D {
}
impl<'a, T: Summary> Dimension<'a, T> for () {
fn zero(_: &T::Context) -> Self {
()
}
fn zero(_: &T::Context) -> Self {}
fn add_summary(&mut self, _: &'a T, _: &T::Context) {}
}
@ -728,7 +726,7 @@ impl<T: KeyedItem> SumTree<T> {
if old_item
.as_ref()
.map_or(false, |old_item| old_item.key() < new_key)
.is_some_and(|old_item| old_item.key() < new_key)
{
new_tree.extend(buffered_items.drain(..), cx);
let slice = cursor.slice(&new_key, Bias::Left);