ID3v2: Move item exports to v2/items/mod.rs

This commit is contained in:
Serial 2023-04-10 15:40:07 -04:00 committed by Alex
parent 4d5d5540df
commit 8f67723e37
5 changed files with 20 additions and 28 deletions

View file

@ -1,9 +1,8 @@
use crate::error::{ID3v2Error, ID3v2ErrorKind, LoftyError, Result};
use crate::id3::v2::frame::FrameValue;
use crate::id3::v2::items::encoded_text_frame::EncodedTextFrame;
use crate::id3::v2::items::identifier::UniqueFileIdentifierFrame;
use crate::id3::v2::items::language_frame::LanguageFrame;
use crate::id3::v2::items::popularimeter::Popularimeter;
use crate::id3::v2::items::{
EncodedTextFrame, LanguageFrame, Popularimeter, UniqueFileIdentifierFrame,
};
use crate::id3::v2::ID3v2Version;
use crate::macros::err;
use crate::picture::Picture;

View file

@ -3,9 +3,8 @@ mod header;
pub(super) mod id;
pub(super) mod read;
use super::items::{EncodedTextFrame, LanguageFrame, Popularimeter, UniqueFileIdentifierFrame};
use crate::error::{ID3v2Error, ID3v2ErrorKind, LoftyError, Result};
use crate::id3::v2::items::encoded_text_frame::EncodedTextFrame;
use crate::id3::v2::items::language_frame::LanguageFrame;
use crate::id3::v2::util::upgrade::{upgrade_v2, upgrade_v3};
use crate::id3::v2::ID3v2Version;
use crate::picture::Picture;
@ -17,12 +16,9 @@ use id::FrameID;
use std::borrow::Cow;
use crate::id3::v2::items::popularimeter::Popularimeter;
use std::convert::{TryFrom, TryInto};
use std::hash::{Hash, Hasher};
use super::items::identifier::UniqueFileIdentifierFrame;
pub(super) const MUSICBRAINZ_UFID_OWNER: &str = "http://musicbrainz.org";
/// Empty content descriptor in text frame

View file

@ -1,6 +1,13 @@
pub(super) mod encapsulated_object;
pub(super) mod encoded_text_frame;
pub(super) mod identifier;
pub(super) mod language_frame;
pub(super) mod popularimeter;
pub(super) mod sync_text;
mod encapsulated_object;
mod encoded_text_frame;
mod identifier;
mod language_frame;
mod popularimeter;
mod sync_text;
pub use encapsulated_object::{GEOBInformation, GeneralEncapsulatedObject};
pub use encoded_text_frame::EncodedTextFrame;
pub use identifier::UniqueFileIdentifierFrame;
pub use language_frame::LanguageFrame;
pub use popularimeter::Popularimeter;
pub use sync_text::{SyncTextContentType, SyncTextInformation, SynchronizedText, TimestampFormat};

View file

@ -31,14 +31,7 @@ pub use util::upgrade::{upgrade_v2, upgrade_v3};
pub use tag::ID3v2Tag;
pub use items::encapsulated_object::{GEOBInformation, GeneralEncapsulatedObject};
pub use items::encoded_text_frame::EncodedTextFrame;
pub use items::identifier::UniqueFileIdentifierFrame;
pub use items::language_frame::LanguageFrame;
pub use items::popularimeter::Popularimeter;
pub use items::sync_text::{
SyncTextContentType, SyncTextInformation, SynchronizedText, TimestampFormat,
};
pub use items::*;
pub use frame::id::FrameID;
pub use frame::{Frame, FrameFlags, FrameValue};

View file

@ -4,9 +4,7 @@ use super::frame::{Frame, FrameFlags, FrameValue, EMPTY_CONTENT_DESCRIPTOR, UNKN
use super::ID3v2Version;
use crate::error::{LoftyError, Result};
use crate::id3::v2::frame::{FrameRef, MUSICBRAINZ_UFID_OWNER};
use crate::id3::v2::items::encoded_text_frame::EncodedTextFrame;
use crate::id3::v2::items::identifier::UniqueFileIdentifierFrame;
use crate::id3::v2::items::language_frame::LanguageFrame;
use crate::id3::v2::items::{EncodedTextFrame, LanguageFrame, UniqueFileIdentifierFrame};
use crate::picture::{Picture, PictureType, TOMBSTONE_PICTURE};
use crate::tag::item::{ItemKey, ItemValue, TagItem};
use crate::tag::{try_parse_year, Tag, TagType};
@ -1074,8 +1072,7 @@ mod tests {
use std::borrow::Cow;
use crate::id3::v2::frame::MUSICBRAINZ_UFID_OWNER;
use crate::id3::v2::items::identifier::UniqueFileIdentifierFrame;
use crate::id3::v2::items::popularimeter::Popularimeter;
use crate::id3::v2::items::{Popularimeter, UniqueFileIdentifierFrame};
use crate::id3::v2::tag::{
filter_comment_frame_by_description, new_text_frame, DEFAULT_NUMBER_IN_PAIR,
};