Skip to content

Commit

Permalink
Remove unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
saivert committed May 9, 2024
1 parent 3903a14 commit 12ad278
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
20 changes: 0 additions & 20 deletions src/backend/pwnodemodel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,6 @@ impl PwNodeModel {

}

pub fn get_node(&self, id: u32) -> Result<PwNodeObject, ()> {
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<u32> {
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 {
Expand Down
3 changes: 1 addition & 2 deletions src/backend/pwnodeobject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 12ad278

Please sign in to comment.