doc: Fix even more example imports

This commit is contained in:
Serial 2024-04-14 12:37:28 -04:00 committed by Alex
parent adea986132
commit 07db142e2c
6 changed files with 18 additions and 22 deletions

View file

@ -107,7 +107,7 @@ impl ApeTag {
///
/// ```rust
/// use lofty::ape::ApeTag;
/// use lofty::Accessor;
/// use lofty::tag::Accessor;
///
/// let mut ape_tag = ApeTag::new();
/// ape_tag.set_title(String::from("Foo title"));
@ -138,7 +138,7 @@ impl ApeTag {
///
/// ```rust
/// use lofty::ape::ApeTag;
/// use lofty::Accessor;
/// use lofty::tag::Accessor;
///
/// let mut ape_tag = ApeTag::new();
/// ape_tag.set_title(String::from("Foo title"));

View file

@ -199,7 +199,7 @@ impl Id3v2Tag {
///
/// ```rust
/// use lofty::id3::v2::{FrameId, Id3v2Tag};
/// use lofty::Accessor;
/// use lofty::tag::Accessor;
/// use std::borrow::Cow;
///
/// const TITLE_ID: FrameId<'_> = FrameId::Valid(Cow::Borrowed("TIT2"));
@ -240,7 +240,7 @@ impl Id3v2Tag {
///
/// ```rust
/// use lofty::id3::v2::{FrameId, Id3v2Tag};
/// use lofty::Accessor;
/// use lofty::tag::Accessor;
/// use std::borrow::Cow;
///
/// const TITLE_ID: FrameId<'_> = FrameId::Valid(Cow::Borrowed("TIT2"));
@ -418,7 +418,7 @@ impl Id3v2Tag {
///
/// const MOOD_FRAME_ID: FrameId<'static> = FrameId::Valid(Cow::Borrowed("TMOO"));
///
/// # fn main() -> lofty::Result<()> {
/// # fn main() -> lofty::error::Result<()> {
/// let mut tag = Id3v2Tag::new();
/// assert!(tag.is_empty());
///

View file

@ -106,7 +106,7 @@ impl Ilst {
///
/// ```rust
/// use lofty::mp4::{AtomIdent, Ilst};
/// use lofty::Accessor;
/// use lofty::tag::Accessor;
///
/// let mut ilst = Ilst::new();
/// ilst.set_title(String::from("Foo title"));
@ -174,7 +174,7 @@ impl Ilst {
///
/// ```rust
/// use lofty::mp4::{Atom, AtomData, AtomIdent, Ilst};
/// use lofty::Accessor;
/// use lofty::tag::Accessor;
///
/// const TITLE_IDENTIFIER: AtomIdent = AtomIdent::Fourcc(*b"\xa9nam");
///
@ -201,7 +201,7 @@ impl Ilst {
///
/// ```rust
/// use lofty::mp4::{Atom, AtomData, AtomIdent, Ilst};
/// use lofty::Accessor;
/// use lofty::tag::Accessor;
///
/// const TITLE_IDENTIFIER: AtomIdent = AtomIdent::Fourcc(*b"\xa9nam");
///

View file

@ -57,9 +57,9 @@ macro_rules! accessor_trait {
/// # Example
///
/// ```rust
/// use lofty::{Tag, Accessor};
/// use lofty::tag::{Tag, Accessor};
///
/// # let tag_type = lofty::TagType::Id3v2;
/// # let tag_type = lofty::tag::TagType::Id3v2;
/// let mut tag = Tag::new(tag_type);
#[doc = "assert_eq!(tag." $name $(_ $other)* "(), None);"]
/// ```
@ -74,7 +74,7 @@ macro_rules! accessor_trait {
/// # Example
///
/// ```rust,ignore
/// use lofty::{Tag, Accessor};
/// use lofty::tag::{Tag, Accessor};
///
/// let mut tag = Tag::new(tag_type);
#[doc = "tag.set_" $name $(_ $other)* "(value);"]
@ -92,7 +92,7 @@ macro_rules! accessor_trait {
/// # Example
///
/// ```rust,ignore
/// use lofty::{Tag, Accessor};
/// use lofty::tag::{Tag, Accessor};
///
/// let mut tag = Tag::new(tag_type);
#[doc = "tag.set_" $name $(_ $other)* "(value);"]

View file

@ -66,8 +66,7 @@ macro_rules! impl_accessor {
/// Accessing common items
///
/// ```rust
/// use lofty::tag::{Tag, TagType};
/// use lofty::Accessor;
/// use lofty::tag::{Accessor, Tag, TagType};
///
/// let tag = Tag::new(TagType::Id3v2);
///

View file

@ -25,9 +25,8 @@ pub trait TagExt: Accessor + Into<Tag> + Sized {
/// # Example
///
/// ```rust
/// use lofty::tag::{ItemKey, Tag, TagExt};
/// use lofty::Accessor;
/// # let tag_type = lofty::TagType::Id3v2;
/// use lofty::tag::{Accessor, ItemKey, Tag, TagExt};
/// # let tag_type = lofty::tag::TagType::Id3v2;
///
/// let mut tag = Tag::new(tag_type);
/// assert_eq!(tag.len(), 0);
@ -42,9 +41,8 @@ pub trait TagExt: Accessor + Into<Tag> + Sized {
/// # Example
///
/// ```rust
/// use lofty::tag::{ItemKey, Tag, TagExt};
/// use lofty::Accessor;
/// # let tag_type = lofty::TagType::Id3v2;
/// use lofty::tag::{Accessor, ItemKey, Tag, TagExt};
/// # let tag_type = lofty::tag::TagType::Id3v2;
///
/// let mut tag = Tag::new(tag_type);
/// assert!(tag.is_empty());
@ -59,8 +57,7 @@ pub trait TagExt: Accessor + Into<Tag> + Sized {
/// # Example
///
/// ```rust
/// use lofty::tag::{Tag, TagExt};
/// use lofty::Accessor;
/// use lofty::tag::{Accessor, Tag, TagExt};
/// # let tag_type = lofty::tag::TagType::Id3v2;
///
/// let mut tag = Tag::new(tag_type);