[fractal] chore: Fix new clippy nightly warnings
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal] chore: Fix new clippy nightly warnings
- Date: Tue, 5 Jul 2022 10:28:58 +0000 (UTC)
commit d6670ea27c04f9da3bcefc3a792b240a3b179f03
Author: Kévin Commaille <zecakeh tedomum fr>
Date: Tue Jul 5 11:54:46 2022 +0200
chore: Fix new clippy nightly warnings
Part-of: <https://gitlab.gnome.org/GNOME/fractal/-/merge_requests/1116>
src/components/auth_dialog.rs | 2 +-
src/components/media_content_viewer.rs | 2 +-
src/components/video_player.rs | 2 +-
src/session/content/explore/public_room.rs | 4 ++--
src/session/content/room_history/message_row/mod.rs | 4 ++--
src/session/mod.rs | 2 +-
src/session/room_list.rs | 8 ++++----
7 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/components/auth_dialog.rs b/src/components/auth_dialog.rs
index ed35bcf13..ab3d5521b 100644
--- a/src/components/auth_dialog.rs
+++ b/src/components/auth_dialog.rs
@@ -119,7 +119,7 @@ mod imp {
fn class_init(klass: &mut Self::Class) {
Self::bind_template(klass);
- let response = (&[false]).to_variant();
+ let response = [false].to_variant();
klass.add_binding_signal(
gdk::Key::Escape,
gdk::ModifierType::empty(),
diff --git a/src/components/media_content_viewer.rs b/src/components/media_content_viewer.rs
index f17a1b79f..b01687873 100644
--- a/src/components/media_content_viewer.rs
+++ b/src/components/media_content_viewer.rs
@@ -208,7 +208,7 @@ impl MediaContentViewer {
let file_info = file
.query_info_future(
- *gio::FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ &gio::FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
gio::FileQueryInfoFlags::NONE,
glib::PRIORITY_DEFAULT,
)
diff --git a/src/components/video_player.rs b/src/components/video_player.rs
index 5d4cb9cf5..2f79671e4 100644
--- a/src/components/video_player.rs
+++ b/src/components/video_player.rs
@@ -112,7 +112,7 @@ impl VideoPlayer {
}
pub fn player(&self) -> &Player {
- &*self.imp().player
+ &self.imp().player
}
pub fn compact(&self) -> bool {
diff --git a/src/session/content/explore/public_room.rs b/src/session/content/explore/public_room.rs
index 929da4684..5eb3e9d33 100644
--- a/src/session/content/explore/public_room.rs
+++ b/src/session/content/explore/public_room.rs
@@ -103,7 +103,7 @@ mod imp {
if let Some(matrix_public_room) = obj.matrix_public_room() {
obj.set_pending(obj.room_list().session()
.room_list()
- .is_pending_room((&*matrix_public_room.room_id).into()));
+ .is_pending_room((*matrix_public_room.room_id).into()));
}
}));
}
@@ -181,7 +181,7 @@ impl PublicRoom {
priv_.room_handler.replace(Some(handler_id));
}
- self.set_pending(self.room_list().is_pending_room((&*room.room_id).into()));
+ self.set_pending(self.room_list().is_pending_room((*room.room_id).into()));
priv_.matrix_public_room.set(room).unwrap();
}
diff --git a/src/session/content/room_history/message_row/mod.rs
b/src/session/content/room_history/message_row/mod.rs
index 05921f24c..b2d30f6ca 100644
--- a/src/session/content/room_history/message_row/mod.rs
+++ b/src/session/content/room_history/message_row/mod.rs
@@ -210,12 +210,12 @@ impl MessageRow {
build_content(reply.content(), &event, false);
priv_.content.set_child(Some(&reply));
} else {
- build_content(&*priv_.content, &event, false);
+ build_content(&priv_.content, &event, false);
}
})
);
} else {
- build_content(&*self.imp().content, event, false);
+ build_content(&self.imp().content, event, false);
}
}
}
diff --git a/src/session/mod.rs b/src/session/mod.rs
index 5c4e244bf..b6edd005f 100644
--- a/src/session/mod.rs
+++ b/src/session/mod.rs
@@ -865,7 +865,7 @@ impl Session {
spawn!(async move {
if let Some(session) = obj_weak.upgrade() {
let room_ids = event.content.iter().fold(HashSet::new(), |mut
acc, (_, rooms)| {
- acc.extend(&*rooms);
+ acc.extend(rooms);
acc
});
for room_id in room_ids {
diff --git a/src/session/room_list.rs b/src/session/room_list.rs
index 8bb57d918..8bb3341b1 100644
--- a/src/session/room_list.rs
+++ b/src/session/room_list.rs
@@ -164,7 +164,7 @@ impl RoomList {
let sender = Cell::new(Some(sender));
// FIXME: add a timeout
let handler_id = self.connect_items_changed(move |obj, _, _, _| {
- if let Some(room) = obj.get(&*room_id) {
+ if let Some(room) = obj.get(&room_id) {
if let Some(sender) = sender.take() {
sender.send(Some(room)).unwrap();
}
@@ -261,7 +261,7 @@ impl RoomList {
})
.clone();
- self.pending_rooms_remove((&*room_id).into());
+ self.pending_rooms_remove((*room_id).into());
room.handle_left_response(left_room);
}
@@ -276,7 +276,7 @@ impl RoomList {
})
.clone();
- self.pending_rooms_remove((&*room_id).into());
+ self.pending_rooms_remove((*room_id).into());
room.handle_joined_response(joined_room);
}
@@ -291,7 +291,7 @@ impl RoomList {
})
.clone();
- self.pending_rooms_remove((&*room_id).into());
+ self.pending_rooms_remove((*room_id).into());
room.handle_invited_response(invited_room);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]