From b1058f5a0b5812bb03a0ea4746a47eee8a5034ff Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Fri, 31 Mar 2023 13:13:38 +0900 Subject: [PATCH] Change code order --- src/library/beets.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/library/beets.rs b/src/library/beets.rs index 98f5592..9831693 100644 --- a/src/library/beets.rs +++ b/src/library/beets.rs @@ -8,6 +8,10 @@ trait QueryOptionArgBeets { fn to_arg(&self, option_name: &str) -> Option; } +trait QueryArgsBeets { + fn to_args(&self) -> Vec; +} + trait SimpleOption {} impl SimpleOption for String {} impl SimpleOption for u32 {} @@ -34,10 +38,6 @@ impl QueryOptionArgBeets for QueryOption> { } } -trait QueryArgsBeets { - fn to_args(&self) -> Vec; -} - impl QueryArgsBeets for Query { fn to_args(&self) -> Vec { let mut arguments: Vec = vec![]; @@ -78,12 +78,6 @@ pub struct Beets { executor: Box, } -impl Beets { - pub fn new(executor: Box) -> Beets { - Beets { executor } - } -} - trait LibraryPrivate { const CMD_LIST: &'static str; const LIST_FORMAT_SEPARATOR: &'static str; @@ -93,6 +87,12 @@ trait LibraryPrivate { fn list_to_albums(list_output: Vec) -> Result, Error>; } +impl Beets { + pub fn new(executor: Box) -> Beets { + Beets { executor } + } +} + impl Library for Beets { fn list(&mut self, query: &Query) -> Result, Error> { let cmd = Self::list_cmd_and_args(query);