From 8de736e563787688f9c7305fefd98fa8871c8d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannik=20B=C3=B6ttcher?= Date: Fri, 7 Aug 2020 15:03:36 +0200 Subject: [PATCH] properly export and use the match macro --- src/index/metadata.rs | 6 ++---- src/utils.rs | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/index/metadata.rs b/src/index/metadata.rs index a4bf4ec..5040c3e 100644 --- a/src/index/metadata.rs +++ b/src/index/metadata.rs @@ -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, @@ -164,7 +162,7 @@ fn read_vorbis(path: &Path) -> Result { }; 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 { }; 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), diff --git a/src/utils.rs b/src/utils.rs index 356a845..edd847a 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -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 {