mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-11-10 06:34:18 +00:00
picture: Make module public, remove re-exports
This commit is contained in:
parent
c2f711a81f
commit
eceb55044b
9 changed files with 12 additions and 12 deletions
|
@ -154,7 +154,7 @@ pub mod config;
|
|||
pub mod error;
|
||||
pub mod file;
|
||||
pub(crate) mod macros;
|
||||
pub(crate) mod picture;
|
||||
pub mod picture;
|
||||
mod probe;
|
||||
pub mod properties;
|
||||
pub mod resolve;
|
||||
|
@ -174,11 +174,8 @@ pub mod wavpack;
|
|||
|
||||
pub use crate::probe::{read_from, read_from_path, Probe};
|
||||
|
||||
pub use crate::picture::{MimeType, Picture, PictureType};
|
||||
pub use util::text::TextEncoding;
|
||||
|
||||
pub use picture::PictureInformation;
|
||||
|
||||
pub use lofty_attr::LoftyFile;
|
||||
|
||||
pub mod prelude {
|
||||
|
|
|
@ -174,7 +174,7 @@ pub trait OggPictureStorage: private::Sealed {
|
|||
}
|
||||
|
||||
mod private {
|
||||
use crate::{Picture, PictureInformation};
|
||||
use crate::picture::{Picture, PictureInformation};
|
||||
|
||||
pub trait Sealed {
|
||||
fn pictures_mut(&mut self) -> &mut Vec<(Picture, PictureInformation)>;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
//! Format-agnostic picture handling
|
||||
|
||||
use crate::config::ParsingMode;
|
||||
use crate::error::{ErrorKind, LoftyError, Result};
|
||||
use crate::macros::err;
|
||||
|
@ -138,7 +140,7 @@ pub enum PictureType {
|
|||
impl PictureType {
|
||||
// ID3/OGG specific methods
|
||||
|
||||
/// Get a u8 from a `PictureType` according to ID3v2 APIC
|
||||
/// Get a `u8` from a `PictureType` according to ID3v2 APIC
|
||||
pub fn as_u8(&self) -> u8 {
|
||||
match self {
|
||||
Self::Other => 0,
|
||||
|
|
|
@ -616,10 +616,10 @@ impl MergeTag for SplitTagRemainder {
|
|||
mod tests {
|
||||
use super::try_parse_year;
|
||||
use crate::config::WriteOptions;
|
||||
use crate::picture::{Picture, PictureType};
|
||||
use crate::prelude::*;
|
||||
use crate::tag::utils::test_utils::read_path;
|
||||
use crate::tag::{Tag, TagType};
|
||||
use crate::{Picture, PictureType};
|
||||
|
||||
use std::io::{Seek, Write};
|
||||
use std::process::Command;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use crate::get_reader;
|
||||
use lofty::error::ErrorKind;
|
||||
use lofty::PictureInformation;
|
||||
use lofty::picture::PictureInformation;
|
||||
|
||||
#[test]
|
||||
fn crash1() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::get_reader;
|
||||
use lofty::PictureInformation;
|
||||
use lofty::picture::PictureInformation;
|
||||
|
||||
#[test]
|
||||
fn crash1() {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use lofty::config::ParsingMode;
|
||||
use lofty::id3::v2::{AttachedPictureFrame, Id3v2Version};
|
||||
use lofty::{Picture, PictureInformation, PictureType, TextEncoding};
|
||||
use lofty::picture::{Picture, PictureInformation, PictureType};
|
||||
use lofty::TextEncoding;
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::Read;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use lofty::{MimeType, Picture};
|
||||
use lofty::picture::{MimeType, Picture};
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::Read;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use lofty::PictureInformation;
|
||||
use lofty::picture::PictureInformation;
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::Read;
|
||||
|
|
Loading…
Reference in a new issue