diff --git a/src/library/beets.rs b/src/library/beets.rs index 13679d5..26aab1c 100644 --- a/src/library/beets.rs +++ b/src/library/beets.rs @@ -4,11 +4,15 @@ use crate::{Album, Track}; use super::{Error, Library, Query, QueryOption}; -pub trait SimpleOption {} +trait QueryOptionArgBeets { + fn to_arg(&self, option_name: &str) -> Option; +} + +trait SimpleOption {} impl SimpleOption for String {} impl SimpleOption for u32 {} -impl QueryOption { +impl QueryOptionArgBeets for QueryOption { fn to_arg(&self, option_name: &str) -> Option { let (negate, value) = match self { Self::Include(value) => ("", value), @@ -19,7 +23,7 @@ impl QueryOption { } } -impl QueryOption> { +impl QueryOptionArgBeets for QueryOption> { fn to_arg(&self, option_name: &str) -> Option { let (negate, vec) = match self { Self::Include(value) => ("", value), @@ -30,7 +34,11 @@ impl QueryOption> { } } -impl Query { +trait QueryArgsBeets { + fn to_args(&self) -> Vec; +} + +impl QueryArgsBeets for Query { fn to_args(&self) -> Vec { let mut arguments: Vec = vec![];