From 12ad278c535e9cd6e814ce65dc9866b6df943411 Mon Sep 17 00:00:00 2001 From: Nicolai Syvertsen Date: Thu, 9 May 2024 16:04:09 +0200 Subject: [PATCH] Remove unused code. --- src/backend/pwnodemodel.rs | 20 -------------------- src/backend/pwnodeobject.rs | 3 +-- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/backend/pwnodemodel.rs b/src/backend/pwnodemodel.rs index 92957a7..a254fb9 100644 --- a/src/backend/pwnodemodel.rs +++ b/src/backend/pwnodemodel.rs @@ -74,26 +74,6 @@ impl PwNodeModel { } - pub fn get_node(&self, id: u32) -> Result { - let imp = self.imp(); - let vector = imp.0.borrow(); - if let Some(v) = vector.iter().find(|p|id == p.boundid()) { - return Ok(v.clone()); - } - Err(()) - } - - pub fn get_node_pos_from_id(&self, id: u32) -> Option { - let imp = self.imp(); - let vector = imp.0.borrow(); - for (i, v) in vector.iter().enumerate() { - if v.boundid() == id { - return Some(i as u32); - } - } - None - } - } impl Default for PwNodeModel { diff --git a/src/backend/pwnodeobject.rs b/src/backend/pwnodeobject.rs index d73f8d0..7345dbd 100644 --- a/src/backend/pwnodeobject.rs +++ b/src/backend/pwnodeobject.rs @@ -10,8 +10,7 @@ use std::cell::{Cell, RefCell}; use glib::{self, clone, subclass::{prelude::*, Signal}, ObjectExt, ParamSpec, Properties, Value, CastNone}; use once_cell::sync::{Lazy, OnceCell}; use gtk::{gio, prelude::ListModelExt}; -use crate::backend::PwChannelObject; -use super::{PwDeviceObject, PwRouteObject, PwvucontrolManager}; +use super::{PwDeviceObject, PwRouteObject, PwChannelObject, PwvucontrolManager}; use crate::macros::*; mod mixerapi;