From 565d29e5483b149ecfaa747f88cc67eebe54f4de Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Fri, 31 Mar 2023 13:08:50 +0900 Subject: [PATCH] Variable name cleanup --- 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 72d0fcc..0556004 100644 --- a/src/library/beets.rs +++ b/src/library/beets.rs @@ -86,7 +86,7 @@ impl Beets { trait LibraryPrivate { const CMD_LIST: &'static str; - const SEPARATOR: &'static str; + const LIST_FORMAT_SEPARATOR: &'static str; const LIST_FORMAT: &'static str; fn list_cmd_and_args(query: &Query) -> Vec; @@ -101,7 +101,7 @@ impl Library for Beets { } } -macro_rules! separator { +macro_rules! list_format_separator { () => { "-*^-" }; @@ -109,19 +109,19 @@ macro_rules! separator { impl LibraryPrivate for Beets { const CMD_LIST: &'static str = "ls"; - const SEPARATOR: &'static str = separator!(); + const LIST_FORMAT_SEPARATOR: &'static str = list_format_separator!(); const LIST_FORMAT: &'static str = concat!( "--format=", "$albumartist", - separator!(), + list_format_separator!(), "$year", - separator!(), + list_format_separator!(), "$album", - separator!(), + list_format_separator!(), "$track", - separator!(), + list_format_separator!(), "$title", - separator!(), + list_format_separator!(), "$artist" ); @@ -137,7 +137,7 @@ impl LibraryPrivate for Beets { let mut album_ids = HashSet::::new(); for line in list_output.iter() { - let split: Vec<&str> = line.split(Self::SEPARATOR).collect(); + let split: Vec<&str> = line.split(Self::LIST_FORMAT_SEPARATOR).collect(); if split.len() != 6 { return Err(Error::InvalidData(line.to_string())); @@ -285,7 +285,7 @@ mod tests { strings.push(format!( "{album_artist}{0}{album_year}{0}{album_title}{0}\ {track_number}{0}{track_title}{0}{track_artist}", - Beets::SEPARATOR, + Beets::LIST_FORMAT_SEPARATOR, )); }