Don't use macros when not needed
This commit is contained in:
parent
9cf8e1375c
commit
d59bca8194
@ -1,8 +1,4 @@
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
macro_rules! database_json {
|
||||
() => {
|
||||
"[\
|
||||
pub static DATABASE_JSON: &str = "[\
|
||||
{\
|
||||
\"id\":{\"name\":\"album_artist a\"},\
|
||||
\"sort\":null,\
|
||||
@ -137,8 +133,4 @@ macro_rules! database_json {
|
||||
}\
|
||||
]\
|
||||
}\
|
||||
]"
|
||||
};
|
||||
}
|
||||
|
||||
pub static DATABASE_JSON: Lazy<&str> = Lazy::new(|| database_json!());
|
||||
]";
|
||||
|
@ -1,7 +1,6 @@
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
macro_rules! library_beets {
|
||||
() => {
|
||||
pub static LIBRARY_BEETS: Lazy<Vec<String>> = Lazy::new(|| -> Vec<String> {
|
||||
vec![
|
||||
String::from("album_artist a -*^- -*^- 1998 -*^- album_title a.a -*^- 1 -*^- track a.a.1 -*^- artist a.a.1 -*^- FLAC -*^- 992"),
|
||||
String::from("album_artist a -*^- -*^- 1998 -*^- album_title a.a -*^- 2 -*^- track a.a.2 -*^- artist a.a.2.1; artist a.a.2.2 -*^- MP3 -*^- 320"),
|
||||
@ -17,7 +16,4 @@ macro_rules! library_beets {
|
||||
String::from("album_artist c -*^- -*^- 2018 -*^- album_title c.b -*^- 1 -*^- track c.b.1 -*^- artist c.b.1 -*^- FLAC -*^- 1041"),
|
||||
String::from("album_artist c -*^- -*^- 2018 -*^- album_title c.b -*^- 2 -*^- track c.b.2 -*^- artist c.b.2.1; artist c.b.2.2 -*^- FLAC -*^- 756")
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
pub static LIBRARY_BEETS: Lazy<Vec<String>> = Lazy::new(|| library_beets!());
|
||||
});
|
||||
|
@ -1,10 +1,8 @@
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
use crate::library::Item;
|
||||
use crate::Format;
|
||||
use crate::{library::Item, Format};
|
||||
|
||||
macro_rules! library_items {
|
||||
() => {
|
||||
pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| -> Vec<Item> {
|
||||
vec![
|
||||
Item {
|
||||
album_artist: String::from("album_artist a"),
|
||||
@ -165,7 +163,4 @@ macro_rules! library_items {
|
||||
track_bitrate: 756,
|
||||
},
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
pub static LIBRARY_ITEMS: Lazy<Vec<Item>> = Lazy::new(|| library_items!());
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user