Skip to content

Commit 9d65c49

Browse files
committed
fix: Make "cargo doc" build cleanly
- a few types need to be qualified with crate:: - get_by_tag_code() is now get_by_ifd_tag_code() - Error::InvalidEntry doesn't exist, don't mention it in docs
1 parent a12a180 commit 9d65c49

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

src/exif/exif_exif.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl Exif {
3737
///
3838
/// - If you have any custom defined tag which does not exist in
3939
/// [`ExifTag`], you can always get the entry value by a raw tag code,
40-
/// see [`Self::get_by_tag_code`].
40+
/// see [`Self::get_by_ifd_tag_code`].
4141
///
4242
/// ## Example
4343
///

src/exif/exif_iter.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub(crate) fn input_into_iter(
6868
///
6969
/// The new cloned `ExifIter`'s iteration index will be reset to the first one.
7070
///
71-
/// If you want to convert an `ExifIter` `into` an [`Exif`], you probably want
71+
/// If you want to convert an `ExifIter` `into` an [`Exif`](crate::Exif), you probably want
7272
/// to clone the `ExifIter` and use the new cloned one to do the converting.
7373
/// Since the original's iteration index may have been modified by
7474
/// `Iterator::next()` calls.
@@ -288,9 +288,10 @@ impl ParsedExifEntry {
288288
/// Returns:
289289
///
290290
/// - If any error occurred while parsing this entry, an
291-
/// Err(&[`EntryError`]) is returned.
291+
/// `Err(&EntryError)` is returned.
292292
///
293-
/// - Otherwise, an Ok(&[`EntryValue`]) is returned.
293+
/// - Otherwise, an `Ok(&EntryValue)` is returned.
294+
#[allow(rustdoc::private_intra_doc_links)]
294295
pub fn get_result(&self) -> Result<&EntryValue, &EntryError> {
295296
match self.res {
296297
Some(ref v) => v.as_ref(),
@@ -306,9 +307,9 @@ impl ParsedExifEntry {
306307
/// Returns:
307308
///
308309
/// - If any error occurred while parsing this entry, an
309-
/// Err([`InvalidEntry`](crate::Error::InvalidEntry)) is returned.
310+
/// `Err(EntryError)` is returned.
310311
///
311-
/// - Otherwise, an Ok([`EntryValue`]) is returned.
312+
/// - Otherwise, an `Ok(EntryValue)` is returned.
312313
///
313314
/// **Note**: This method can ONLY be called once! If you call it twice, it
314315
/// will **panic** directly!

src/exif/tags.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Define exif tags and related enums, see
2-
//! https://exiftool.org/TagNames/EXIF.html
2+
//! <https://exiftool.org/TagNames/EXIF.html>
33
44
use std::fmt::{Debug, Display};
55

@@ -70,7 +70,7 @@ impl Display for ExifTagCode {
7070
///
7171
/// You can always get the entry value by raw tag code which is an `u16` value.
7272
/// See [`ParsedExifEntry::tag_code`](crate::ParsedExifEntry::tag_code) and
73-
/// [`Exif::get_by_tag_code`](crate::Exif::get_by_tag_code).
73+
/// [`Exif::get_by_ifd_tag_code`](crate::Exif::get_by_ifd_tag_code).
7474
#[allow(unused)]
7575
#[cfg_attr(feature = "json_dump", derive(Serialize, Deserialize))]
7676
#[derive(Debug, Eq, PartialEq, Hash, Clone, Copy)]

src/file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl TryFrom<&[u8]> for Mime {
101101
}
102102
}
103103

104-
/// *Deprecated*: Please use [`MediaSource`] instead.
104+
/// *Deprecated*: Please use [`crate::MediaSource`] instead.
105105
#[deprecated(since = "2.0.0")]
106106
#[allow(unused)]
107107
#[derive(Debug, Clone, Copy, PartialEq, Eq)]

src/mov.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use crate::{
2121
EntryValue, FileFormat,
2222
};
2323

24-
/// *Deprecated*: Please use [`MediaParser`] instead.
24+
/// *Deprecated*: Please use [`crate::MediaParser`] instead.
2525
///
2626
/// Analyze the byte stream in the `reader` as a MOV/MP4 file, attempting to
2727
/// extract any possible metadata it may contain, and return it in the form of

src/parser_async.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ impl AsyncMediaParser {
349349
/// - For [`ExifIter`] as parse output, Please avoid holding the `ExifIter`
350350
/// object all the time and drop it immediately after use. Otherwise, the
351351
/// parsing buffer referenced by the `ExifIter` object will not be reused
352-
/// by [`MediaParser`], resulting in repeated memory allocation in the
352+
/// by [`crate::MediaParser`], resulting in repeated memory allocation in the
353353
/// subsequent parsing process.
354354
///
355355
/// If you really need to retain some data, please take out the required

0 commit comments

Comments
 (0)