Enable clippy::useless_conversion
(#8767)
This PR enables the [`clippy::useless_conversion`](https://rust-lang.github.io/rust-clippy/master/index.html#/useless_conversion) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
20d133322a
commit
fe04f69caf
30 changed files with 53 additions and 66 deletions
|
@ -45,7 +45,7 @@ impl IpsFile {
|
|||
pub fn description(&self, panic: Option<&str>) -> String {
|
||||
let mut desc = if self.body.termination.indicator == "Abort trap: 6" {
|
||||
match panic {
|
||||
Some(panic_message) => format!("Panic `{}`", panic_message).into(),
|
||||
Some(panic_message) => format!("Panic `{}`", panic_message),
|
||||
None => "Crash `Abort trap: 6` (possible panic)".into(),
|
||||
}
|
||||
} else if let Some(msg) = &self.body.exception.message {
|
||||
|
|
|
@ -1021,7 +1021,7 @@ impl Database {
|
|||
.add(room_participant::Column::UserId.eq(user_id)),
|
||||
)
|
||||
.set(room_participant::ActiveModel {
|
||||
role: ActiveValue::set(Some(ChannelRole::from(role))),
|
||||
role: ActiveValue::set(Some(role)),
|
||||
..Default::default()
|
||||
})
|
||||
.exec(&*tx)
|
||||
|
|
|
@ -2883,7 +2883,7 @@ async fn update_channel_buffer(
|
|||
.flat_map(|user_id| pool.user_connection_ids(*user_id)),
|
||||
|peer_id| {
|
||||
session.peer.send(
|
||||
peer_id.into(),
|
||||
peer_id,
|
||||
proto::UpdateChannels {
|
||||
latest_channel_buffer_versions: vec![proto::ChannelBufferVersion {
|
||||
channel_id: channel_id.to_proto(),
|
||||
|
@ -2968,8 +2968,8 @@ fn channel_buffer_updated<T: EnvelopedMessage>(
|
|||
message: &T,
|
||||
peer: &Peer,
|
||||
) {
|
||||
broadcast(Some(sender_id), collaborators.into_iter(), |peer_id| {
|
||||
peer.send(peer_id.into(), message.clone())
|
||||
broadcast(Some(sender_id), collaborators, |peer_id| {
|
||||
peer.send(peer_id, message.clone())
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -3074,7 +3074,7 @@ async fn send_channel_message(
|
|||
.flat_map(|user_id| pool.user_connection_ids(*user_id)),
|
||||
|peer_id| {
|
||||
session.peer.send(
|
||||
peer_id.into(),
|
||||
peer_id,
|
||||
proto::UpdateChannels {
|
||||
latest_channel_message_ids: vec![proto::ChannelMessageId {
|
||||
channel_id: channel_id.to_proto(),
|
||||
|
@ -3447,7 +3447,7 @@ fn room_updated(room: &proto::Room, peer: &Peer) {
|
|||
.filter_map(|participant| Some(participant.peer_id?.into())),
|
||||
|peer_id| {
|
||||
peer.send(
|
||||
peer_id.into(),
|
||||
peer_id,
|
||||
proto::RoomUpdated {
|
||||
room: Some(room.clone()),
|
||||
},
|
||||
|
@ -3476,7 +3476,7 @@ fn channel_updated(
|
|||
.flat_map(|user_id| pool.user_connection_ids(*user_id)),
|
||||
|peer_id| {
|
||||
peer.send(
|
||||
peer_id.into(),
|
||||
peer_id,
|
||||
proto::UpdateChannels {
|
||||
channel_participants: vec![proto::ChannelParticipants {
|
||||
channel_id: channel_id.to_proto(),
|
||||
|
|
|
@ -1431,7 +1431,7 @@ fn assert_channels(
|
|||
.ordered_channels()
|
||||
.map(|(depth, channel)| ExpectedChannel {
|
||||
depth,
|
||||
name: channel.name.clone().into(),
|
||||
name: channel.name.clone(),
|
||||
id: channel.id,
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
|
|
|
@ -833,7 +833,7 @@ async fn test_language_server_statuses(cx_a: &mut TestAppContext, cx_b: &mut Tes
|
|||
let mut fake_language_servers = client_a.language_registry().register_fake_lsp_adapter(
|
||||
"Rust",
|
||||
FakeLspAdapter {
|
||||
name: "the-language-server".into(),
|
||||
name: "the-language-server",
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue