mirror of
https://gitlab.freedesktop.org/pipewire/helvum
synced 2026-03-15 03:26:10 +08:00
fix clippy warnings
This commit is contained in:
@@ -113,7 +113,7 @@ impl Application {
|
|||||||
pw_sender: Sender<GtkMessage>,
|
pw_sender: Sender<GtkMessage>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let app: Application = glib::Object::builder()
|
let app: Application = glib::Object::builder()
|
||||||
.property("application-id", &"org.pipewire.Helvum")
|
.property("application-id", "org.pipewire.Helvum")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let imp = app.imp();
|
let imp = app.imp();
|
||||||
|
|||||||
@@ -717,7 +717,7 @@ impl GraphView {
|
|||||||
|
|
||||||
pub(super) fn move_node(&self, widget: &Node, point: &Point) {
|
pub(super) fn move_node(&self, widget: &Node, point: &Point) {
|
||||||
let mut nodes = self.imp().nodes.borrow_mut();
|
let mut nodes = self.imp().nodes.borrow_mut();
|
||||||
let mut node = nodes
|
let node = nodes
|
||||||
.get_mut(&widget.pipewire_id())
|
.get_mut(&widget.pipewire_id())
|
||||||
.expect("Node is not on the graph");
|
.expect("Node is not on the graph");
|
||||||
|
|
||||||
|
|||||||
@@ -112,3 +112,9 @@ impl Link {
|
|||||||
self.set_property("active", active);
|
self.set_property("active", active);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Link {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ glib::wrapper! {
|
|||||||
impl Node {
|
impl Node {
|
||||||
pub fn new(name: &str, pipewire_id: u32) -> Self {
|
pub fn new(name: &str, pipewire_id: u32) -> Self {
|
||||||
glib::Object::builder()
|
glib::Object::builder()
|
||||||
.property("name", &name)
|
.property("name", name)
|
||||||
.property("pipewire-id", &pipewire_id)
|
.property("pipewire-id", pipewire_id)
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -125,8 +125,8 @@ impl Port {
|
|||||||
pub fn new(id: u32, name: &str, direction: Direction, media_type: Option<MediaType>) -> Self {
|
pub fn new(id: u32, name: &str, direction: Direction, media_type: Option<MediaType>) -> Self {
|
||||||
// Create the widget and initialize needed fields
|
// Create the widget and initialize needed fields
|
||||||
let res: Self = glib::Object::builder()
|
let res: Self = glib::Object::builder()
|
||||||
.property("pipewire-id", &id)
|
.property("pipewire-id", id)
|
||||||
.property("name", &name)
|
.property("name", name)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let imp = res.imp();
|
let imp = res.imp();
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ mod imp {
|
|||||||
fn update_zoom_factor_text(&self, zoom_factor: f64) {
|
fn update_zoom_factor_text(&self, zoom_factor: f64) {
|
||||||
self.entry
|
self.entry
|
||||||
.buffer()
|
.buffer()
|
||||||
.set_text(&format!("{factor:.0}%", factor = zoom_factor * 100.));
|
.set_text(format!("{factor:.0}%", factor = zoom_factor * 100.));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user