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>,
|
||||
) -> Self {
|
||||
let app: Application = glib::Object::builder()
|
||||
.property("application-id", &"org.pipewire.Helvum")
|
||||
.property("application-id", "org.pipewire.Helvum")
|
||||
.build();
|
||||
|
||||
let imp = app.imp();
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -112,3 +112,9 @@ impl Link {
|
||||
self.set_property("active", active);
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Link {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
@@ -125,8 +125,8 @@ impl Port {
|
||||
pub fn new(id: u32, name: &str, direction: Direction, media_type: Option<MediaType>) -> 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();
|
||||
|
||||
@@ -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.));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user