use Arc<str> where applicable; use konst split_at

This commit is contained in:
🪞👃🪞 2025-01-08 00:24:40 +01:00
parent 411fc0c4bc
commit 305481adee
35 changed files with 286 additions and 273 deletions

View file

@ -8,8 +8,8 @@ pub use self::lv2::LV2Plugin;
pub struct Plugin {
/// JACK client handle (needs to not be dropped for standalone mode to work).
pub jack: Arc<RwLock<JackConnection>>,
pub name: String,
pub path: Option<String>,
pub name: Arc<str>,
pub path: Option<Arc<str>>,
pub plugin: Option<PluginKind>,
pub selected: usize,
pub mapping: bool,
@ -47,7 +47,7 @@ impl Plugin {
Ok(Self {
jack: jack.clone(),
name: name.into(),
path: Some(String::from(path)),
path: Some(String::from(path).into()),
plugin: Some(PluginKind::LV2(LV2Plugin::new(path)?)),
selected: 0,
mapping: false,