properly export and use the match macro

This commit is contained in:
Yannik Böttcher 2020-08-07 15:03:36 +02:00
parent 943174bafa
commit 8de736e563
2 changed files with 3 additions and 4 deletions

View file

@ -14,8 +14,6 @@ use opus_headers;
use crate::utils;
use crate::utils::AudioFormat;
use crate::match_ignore_case;
#[derive(Debug, Clone, PartialEq)]
pub struct SongTags {
pub disc_number: Option<u32>,
@ -164,7 +162,7 @@ fn read_vorbis(path: &Path) -> Result<SongTags> {
};
for (key, value) in source.comment_hdr.comment_list {
match_ignore_case! {
utils::match_ignore_case! {
match key {
"TITLE" => tags.title = Some(value),
"ALBUM" => tags.album = Some(value),
@ -197,7 +195,7 @@ fn read_opus(path: &Path) -> Result<SongTags> {
};
for (key, value) in headers.comments.user_comments {
match_ignore_case! {
utils::match_ignore_case! {
match key {
"TITLE" => tags.title = Some(value),
"ALBUM" => tags.album = Some(value),

View file

@ -13,6 +13,7 @@ macro_rules! match_ignore_case {
{ $catch_all }
}};
}
pub use crate::match_ignore_case;
#[cfg(target_family = "windows")]
const APP_INFO: AppInfo = AppInfo {