doc: Fix some broken links

This commit is contained in:
Serial 2024-05-01 13:15:33 -04:00 committed by Alex
parent 2ced6e5fef
commit dc018f3963
2 changed files with 8 additions and 3 deletions

View file

@ -90,7 +90,7 @@ impl GlobalOptions {
/// Whether or not to preserve format-specific items
///
/// When converting a tag from its concrete format (ex. [`Id3v2`](crate::id3::v2::Id3v2Tag)) to
/// When converting a tag from its concrete format (ex. [`Id3v2Tag`](crate::id3::v2::Id3v2Tag)) to
/// a [`Tag`], this options controls whether to preserve any special items that
/// are unique to the concrete tag.
///
@ -107,7 +107,7 @@ impl GlobalOptions {
/// apply_global_options(global_options);
/// ```
///
/// [Tag]: crate::tag::Tag
/// [`Tag`]: crate::tag::Tag
pub fn preserve_format_specific_items(&mut self, preserve_format_specific_items: bool) -> Self {
self.preserve_format_specific_items = preserve_format_specific_items;
*self

View file

@ -241,7 +241,7 @@ impl Tag {
/// # Examples
///
/// ```rust
/// use lofty::tag::{Tag, TagType, Accessor, TagExt};
/// use lofty::tag::{Accessor, Tag, TagExt, TagType};
///
/// let mut tag = Tag::new(TagType::Id3v2);
/// tag.set_album(String::from("Album"));
@ -252,6 +252,9 @@ impl Tag {
/// // But AIFF text chunks do not, the item will be lost
/// tag.re_map(TagType::AiffText);
/// assert!(tag.is_empty());
/// ```
///
/// [`GlobalOptions::preserve_format_specific_items`]: crate::config::GlobalOptions::preserve_format_specific_items
pub fn re_map(&mut self, tag_type: TagType) {
if let Some(companion_tag) = self.companion_tag.take() {
log::warn!("Discarding format-specific items due to remap");
@ -278,6 +281,8 @@ impl Tag {
/// // This must come from a conversion, such as `Id3v2Tag` -> `Tag`
/// assert!(!tag.has_format_specific_items());
/// ```
///
/// [`GlobalOptions::preserve_format_specific_items`]: crate::config::GlobalOptions::preserve_format_specific_items
pub fn has_format_specific_items(&self) -> bool {
self.companion_tag.is_some()
}