jam1garner / binrw

A Rust crate for helping parse and rebuild binary data using ✨macro magic✨.
https://binrw.rs
MIT License
545 stars 35 forks source link

docs: fix warnings and use warning note #266

Closed marxin closed 2 weeks ago

marxin commented 1 month ago

Fixes:

warning: redundant explicit link target
   --> binrw/src/../doc/attribute.md:120:85
    |
120 | | rw  | [`try_calc`](#calculations) | field | Like `calc`, but
returns a [`Result`](Result).
    |
--------  ^^^^^^ explicit target is redundant
    |
|
    |
because label contains path that resolves to same destination
    |
    = note: when a link's destination is not specified,
            the label is used to resolve intra-doc links
    = note: `#[warn(rustdoc::redundant_explicit_links)]` on by default
help: remove explicit link target
    |
120 | | rw  | [`try_calc`](#calculations) | field | Like `calc`, but
returns a [`Result`].
    |
~~~~~~~~~~

warning: redundant explicit link target
   --> binrw/src/../doc/attribute.md:121:92
    |
121 | | rw  | [`try_map`](#map) | all except unit variant | Like `map`,
but returns a [`Result`](Result).
    |
--------  ^^^^^^ explicit target is redundant
    |
|
    |
because label contains path that resolves to same destination
    |
    = note: when a link's destination is not specified,
            the label is used to resolve intra-doc links
help: remove explicit link target
    |
121 | | rw  | [`try_map`](#map) | all except unit variant | Like `map`,
but returns a [`Result`].
    |
~~~~~~~~~~

warning: redundant explicit link target
    --> binrw/src/../doc/attribute.md:1520:13
     |
1520 | [`Default`](core::default::Default) instead of reading data from
the reader:
     |  ---------  ^^^^^^^^^^^^^^^^^^^^^^ explicit target is redundant
     |  |
     |  because label contains path that resolves to same destination
     |
     = note: when a link's destination is not specified,
             the label is used to resolve intra-doc links
help: remove explicit link target
     |
1520 | [`Default`] instead of reading data from the reader:
     | ~~~~~~~~~~~

warning: `binrw` (lib doc) generated 3 warnings