crossterm-rs / crossterm

Cross platform terminal library rust
MIT License
3.18k stars 274 forks source link

docs: cleanup warnings #922

Open joshka opened 3 weeks ago

joshka commented 3 weeks ago
warning: unexpected `cfg` condition name: `winapi`
   --> src/lib.rs:256:11
    |
256 | #[cfg(all(winapi, not(feature = "winapi")))]
    |           ^^^^^^
    |
    = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows`
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(winapi)'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(winapi)");` to the top of the `build.rs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition value: `winapi`
   --> src/lib.rs:256:23
    |
256 | #[cfg(all(winapi, not(feature = "winapi")))]
    |                       ^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bracketed-paste`, `default`, `event-stream`, `events`, `filedescriptor`, `libc`, `serde`, `use-dev-tty`, and `windows`
    = help: consider adding `winapi` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `crossterm_winapi`
   --> src/lib.rs:259:11
    |
259 | #[cfg(all(crossterm_winapi, not(feature = "crossterm_winapi")))]
    |           ^^^^^^^^^^^^^^^^
    |
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(crossterm_winapi)'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(crossterm_winapi)");` to the top of the `build.rs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `crossterm_winapi`
   --> src/lib.rs:259:33
    |
259 | #[cfg(all(crossterm_winapi, not(feature = "crossterm_winapi")))]
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bracketed-paste`, `default`, `event-stream`, `events`, `filedescriptor`, `libc`, `serde`, `use-dev-tty`, and `windows`
    = help: consider adding `crossterm_winapi` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: `crate::event::read` is both a function and a module
  --> src/cursor/sys/unix.rs:16:32
   |
16 | /// [`crossterm::event::read`](crate::event::read) or [`crossterm::event::poll`](crate::event::poll) are being...
   |                                ^^^^^^^^^^^^^^^^^^ ambiguous link
   |
   = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
help: to link to the function, add parentheses
   |
16 | /// [`crossterm::event::read`](crate::event::read()) or [`crossterm::event::poll`](crate::event::poll) are being called.
   |                                                  ++
help: to link to the module, prefix with `mod@`
   |
16 | /// [`crossterm::event::read`](mod@crate::event::read) or [`crossterm::event::poll`](crate::event::poll) are being called.
   |                                ++++

warning: `crate::event::read` is both a function and a module
   --> src/terminal/sys/unix.rs:184:32
    |
184 | /// [`crossterm::event::read`](crate::event::read) or [`crossterm::event::poll`](crate::event::poll) are bein...
    |                                ^^^^^^^^^^^^^^^^^^ ambiguous link
    |
help: to link to the function, add parentheses
    |
184 | /// [`crossterm::event::read`](crate::event::read()) or [`crossterm::event::poll`](crate::event::poll) are being called.
    |                                                  ++
help: to link to the module, prefix with `mod@`
    |
184 | /// [`crossterm::event::read`](mod@crate::event::read) or [`crossterm::event::poll`](crate::event::poll) are being called.
    |                                ++++

warning: this URL is not a hyperlink
  --> src/style/types/colored.rs:74:31
   |
74 |     /// in environment as per https://no-color.org/
   |                               ^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://no-color.org/>`
   |
   = note: bare URLs are not automatically turned into clickable links
   = note: `#[warn(rustdoc::bare_urls)]` on by default

warning: this URL is not a hyperlink
   --> src/style.rs:187:34
    |
187 | /// crossterm supports NO_COLOR (https://no-color.org/) to disabled colored output.
    |                                  ^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://no-color.org/>`
    |
    = note: bare URLs are not automatically turned into clickable links

warning: this URL is not a hyperlink
   --> src/terminal.rs:151:15
    |
151 | /// For unix, https://man7.org/linux/man-pages/man4/tty_ioctl.4.html documents them as "unused".
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://man7.org/linux/man-pages/man4/tty_ioctl.4.html>`
    |
    = note: bare URLs are not automatically turned into clickable links

warning: `crossterm` (lib doc) generated 9 warnings (run `cargo fix --lib -p crossterm` to apply 3 suggestions)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
   Generated /Users/joshka/local/crossterm/target/doc/crossterm/index.html