diff --git a/src/application.rs b/src/application.rs index 2b2da92..44455be 100644 --- a/src/application.rs +++ b/src/application.rs @@ -113,7 +113,7 @@ impl Application { pw_sender: Sender, ) -> Self { let app: Application = glib::Object::builder() - .property("application-id", &"org.pipewire.Helvum") + .property("application-id", "org.pipewire.Helvum") .build(); let imp = app.imp(); diff --git a/src/ui/graph/graph_view.rs b/src/ui/graph/graph_view.rs index 6980cfe..2725b07 100644 --- a/src/ui/graph/graph_view.rs +++ b/src/ui/graph/graph_view.rs @@ -717,7 +717,7 @@ impl GraphView { pub(super) fn move_node(&self, widget: &Node, point: &Point) { let mut nodes = self.imp().nodes.borrow_mut(); - let mut node = nodes + let node = nodes .get_mut(&widget.pipewire_id()) .expect("Node is not on the graph"); diff --git a/src/ui/graph/link.rs b/src/ui/graph/link.rs index d179b6d..4663956 100644 --- a/src/ui/graph/link.rs +++ b/src/ui/graph/link.rs @@ -112,3 +112,9 @@ impl Link { self.set_property("active", active); } } + +impl Default for Link { + fn default() -> Self { + Self::new() + } +} diff --git a/src/ui/graph/node.rs b/src/ui/graph/node.rs index ba4fd12..29a28be 100644 --- a/src/ui/graph/node.rs +++ b/src/ui/graph/node.rs @@ -115,8 +115,8 @@ glib::wrapper! { impl Node { pub fn new(name: &str, pipewire_id: u32) -> Self { glib::Object::builder() - .property("name", &name) - .property("pipewire-id", &pipewire_id) + .property("name", name) + .property("pipewire-id", pipewire_id) .build() } diff --git a/src/ui/graph/port.rs b/src/ui/graph/port.rs index 152787f..385ae52 100644 --- a/src/ui/graph/port.rs +++ b/src/ui/graph/port.rs @@ -125,8 +125,8 @@ impl Port { pub fn new(id: u32, name: &str, direction: Direction, media_type: Option) -> Self { // Create the widget and initialize needed fields let res: Self = glib::Object::builder() - .property("pipewire-id", &id) - .property("name", &name) + .property("pipewire-id", id) + .property("name", name) .build(); let imp = res.imp(); diff --git a/src/ui/graph/zoomentry.rs b/src/ui/graph/zoomentry.rs index 420a13e..719cdee 100644 --- a/src/ui/graph/zoomentry.rs +++ b/src/ui/graph/zoomentry.rs @@ -151,7 +151,7 @@ mod imp { fn update_zoom_factor_text(&self, zoom_factor: f64) { self.entry .buffer() - .set_text(&format!("{factor:.0}%", factor = zoom_factor * 100.)); + .set_text(format!("{factor:.0}%", factor = zoom_factor * 100.)); } } }