misc: Use more compact typed None format

This commit is contained in:
Kévin Commaille 2023-12-20 16:30:30 +01:00
parent 045dd8369f
commit 0ebcb8cbeb
No known key found for this signature in database
GPG Key ID: 29A48C1F03620416
6 changed files with 6 additions and 6 deletions

View File

@ -153,7 +153,7 @@ mod imp {
);
} else {
self.keywords.bind_model(
Option::<&gio::ListModel>::None,
None::<&gio::ListModel>,
clone!(@weak obj => @default-return { adw::ActionRow::new().upcast() }, move |item| obj.create_keyword_row(item)),
);
}

View File

@ -138,7 +138,7 @@ mod imp {
let selection = session.sidebar_list_model().selection_model();
if let Some(selected_room) = selection.selected_item().and_downcast::<Room>() {
if selected_room == *room {
selection.set_selected_item(Option::<glib::Object>::None);
selection.set_selected_item(None::<glib::Object>);
}
}
}

View File

@ -124,7 +124,7 @@ impl AudioRow {
// The GStreamer backend doesn't work with input streams so
// we need to store the file.
// See: https://gitlab.gnome.org/GNOME/gtk/-/issues/4062
let (file, _) = gio::File::new_tmp(Option::<String>::None).unwrap();
let (file, _) = gio::File::new_tmp(None::<String>).unwrap();
file.replace_contents(
&data,
None,

View File

@ -162,7 +162,7 @@ impl MessageAudio {
// The GStreamer backend doesn't work with input streams so
// we need to store the file.
// See: https://gitlab.gnome.org/GNOME/gtk/-/issues/4062
let (file, _) = gio::File::new_tmp(Option::<String>::None).unwrap();
let (file, _) = gio::File::new_tmp(None::<String>).unwrap();
file.replace_contents(
&data,
None,

View File

@ -375,7 +375,7 @@ impl MessageMedia {
// The GStreamer backend of GtkVideo doesn't work with input streams so
// we need to store the file.
// See: https://gitlab.gnome.org/GNOME/gtk/-/issues/4062
let (file, _) = gio::File::new_tmp(Option::<String>::None).unwrap();
let (file, _) = gio::File::new_tmp(None::<String>).unwrap();
file.replace_contents(
&data,
None,

View File

@ -413,7 +413,7 @@ impl MediaViewer {
// The GStreamer backend of GtkVideo doesn't work with input streams so
// we need to store the file.
// See: https://gitlab.gnome.org/GNOME/gtk/-/issues/4062
let (file, _) = gio::File::new_tmp(Option::<String>::None).unwrap();
let (file, _) = gio::File::new_tmp(None::<String>).unwrap();
file.replace_contents(
&data,
None,