app: fix various clippy issue

Fix uninlined_format_args since 1.66.0
This commit is contained in:
Stéphane Cerveau 2023-02-13 16:38:33 +01:00
parent 8603b21d98
commit a02c99fb61
5 changed files with 9 additions and 9 deletions

View file

@ -2,7 +2,7 @@
name = "gst_pipeline_studio" name = "gst_pipeline_studio"
version = "0.2.3" version = "0.2.3"
edition = "2018" edition = "2018"
rust-version = "1.63" rust-version = "1.67"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -55,7 +55,7 @@ pub enum AppState {
impl fmt::Display for AppState { impl fmt::Display for AppState {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self) write!(f, "{self:?}",)
} }
} }
@ -68,7 +68,7 @@ impl ops::Deref for GPSApp {
type Target = GPSAppInner; type Target = GPSAppInner;
fn deref(&self) -> &GPSAppInner { fn deref(&self) -> &GPSAppInner {
&*self.0 &self.0
} }
} }
@ -432,7 +432,7 @@ impl GPSApp {
.valign(gtk::Align::Center) .valign(gtk::Align::Center)
.build(); .build();
box_preview.append(&picture); box_preview.append(&picture);
let label = gtk::Label::new(Some(&format!("Preview{}", n_sink))); let label = gtk::Label::new(Some(&format!("Preview{n_sink}")));
notebook_preview.insert_page(&box_preview, Some(&label), None); notebook_preview.insert_page(&box_preview, Some(&label), None);
} }
@ -635,7 +635,7 @@ impl GPSApp {
if app.player.borrow().create_pipeline(&render_parse_launch).is_ok() { if app.player.borrow().create_pipeline(&render_parse_launch).is_ok() {
GPSUI::message::display_message_dialog(&render_parse_launch,gtk::MessageType::Info, |_| {}); GPSUI::message::display_message_dialog(&render_parse_launch,gtk::MessageType::Info, |_| {});
} else { } else {
GPSUI::message::display_error_dialog(false, &format!("Unable to render:\n\n{}", render_parse_launch)); GPSUI::message::display_error_dialog(false, &format!("Unable to render:\n\n{render_parse_launch}", ));
} }
} }
); );

View file

@ -41,7 +41,7 @@ impl LogLevel {
impl fmt::Display for LogLevel { impl fmt::Display for LogLevel {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self) write!(f, "{self:?}")
} }
} }

View file

@ -53,7 +53,7 @@ pub fn display_message_dialog<F: Fn(Application) + 'static>(
#[allow(dead_code)] #[allow(dead_code)]
pub fn display_error_dialog(fatal: bool, message: &str) { pub fn display_error_dialog(fatal: bool, message: &str) {
display_message_dialog( display_message_dialog(
&format!("Error: {}", message), &format!("Error: {message}"),
gtk::MessageType::Error, gtk::MessageType::Error,
move |app| { move |app| {
if fatal { if fatal {

View file

@ -209,7 +209,7 @@ pub fn display_plugin_properties(app: &GPSApp, element_name: &str, node_id: u32)
} }
let dialog = GPSUI::dialog::create_dialog( let dialog = GPSUI::dialog::create_dialog(
&format!("{} properties", element_name), &format!("{element_name} properties"),
app, app,
&grid, &grid,
glib::clone!(@strong update_properties => move |app, dialog| { glib::clone!(@strong update_properties => move |app, dialog| {
@ -289,7 +289,7 @@ pub fn display_pad_properties(
// Add all specific properties from the given element // Add all specific properties from the given element
let dialog = GPSUI::dialog::create_dialog( let dialog = GPSUI::dialog::create_dialog(
&format!("{} properties from {}", port_name, element_name), &format!("{port_name} properties from {element_name}"),
app, app,
&grid, &grid,
glib::clone!(@strong update_properties => move |app, dialog| { glib::clone!(@strong update_properties => move |app, dialog| {