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
|
@ -890,7 +890,7 @@ impl ChatPanel {
|
|||
this.highlighted_message = Some((highlight_message_id, task));
|
||||
}
|
||||
|
||||
if this.active_chat.as_ref().map_or(false, |(c, _)| *c == chat) {
|
||||
if this.active_chat.as_ref().is_some_and(|(c, _)| *c == chat) {
|
||||
this.message_list.scroll_to(ListOffset {
|
||||
item_ix,
|
||||
offset_in_item: px(0.0),
|
||||
|
@ -1186,7 +1186,7 @@ impl Panel for ChatPanel {
|
|||
let is_in_call = ActiveCall::global(cx)
|
||||
.read(cx)
|
||||
.room()
|
||||
.map_or(false, |room| room.read(cx).contains_guests());
|
||||
.is_some_and(|room| room.read(cx).contains_guests());
|
||||
|
||||
self.active || is_in_call
|
||||
}
|
||||
|
|
|
@ -664,9 +664,7 @@ impl CollabPanel {
|
|||
|
||||
let has_children = channel_store
|
||||
.channel_at_index(mat.candidate_id + 1)
|
||||
.map_or(false, |next_channel| {
|
||||
next_channel.parent_path.ends_with(&[channel.id])
|
||||
});
|
||||
.is_some_and(|next_channel| next_channel.parent_path.ends_with(&[channel.id]));
|
||||
|
||||
match &self.channel_editing_state {
|
||||
Some(ChannelEditingState::Create {
|
||||
|
@ -1125,7 +1123,7 @@ impl CollabPanel {
|
|||
}
|
||||
|
||||
fn has_subchannels(&self, ix: usize) -> bool {
|
||||
self.entries.get(ix).map_or(false, |entry| {
|
||||
self.entries.get(ix).is_some_and(|entry| {
|
||||
if let ListEntry::Channel { has_children, .. } = entry {
|
||||
*has_children
|
||||
} else {
|
||||
|
|
|
@ -497,7 +497,7 @@ impl NotificationPanel {
|
|||
panel.is_scrolled_to_bottom()
|
||||
&& panel
|
||||
.active_chat()
|
||||
.map_or(false, |chat| chat.read(cx).channel_id.0 == *channel_id)
|
||||
.is_some_and(|chat| chat.read(cx).channel_id.0 == *channel_id)
|
||||
} else {
|
||||
false
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue