Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jendrikw committed Sep 13, 2024
1 parent b236d3a commit 37d41a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
- name: Install Rust Toolchain
run: rustup default ${{ matrix.channel }} && rustup component add clippy && cargo install cargo-llvm-cov
- name: Build
run: cargo build --verbose --no-default-features ${{ matrix.features }}
run: RUSTFLAGS="-Dwarnings" cargo build --verbose --no-default-features ${{ matrix.features }}
- name: Run tests
run: cargo llvm-cov test --text --verbose --no-default-features ${{ matrix.features }}
run: RUSTFLAGS="-Dwarnings" cargo llvm-cov test --text --verbose --no-default-features ${{ matrix.features }}
- name: Build docs
run: cargo doc --verbose --no-default-features --no-deps ${{ matrix.features }}
run: RUSTDOCFLAGS="-Dwarnings" cargo doc --verbose --no-default-features --no-deps ${{ matrix.features }}
- name: Run clippy
run: RUSTFLAGS="-Dwarnings" cargo clippy --verbose --no-default-features ${{ matrix.features }}

9 changes: 5 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
// Rustdoc lints
#![warn(rustdoc::broken_intra_doc_links)]
#![warn(rustdoc::missing_crate_level_docs)]

#![no_std]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]

Expand Down Expand Up @@ -88,7 +89,7 @@ use rules::Rules;
mod deserialize_utils;
mod rules;
#[cfg(test)]
#[allow(clippy::mod_module_files)] //
#[allow(clippy::mod_module_files)]
mod tests;

/// A [`UrlCleaner`] can remove tracking parameters from URLs.
Expand All @@ -110,7 +111,7 @@ impl UrlCleaner {
Self::from_rules_file(std::fs::File::open(path)?)
}

/// Construct a [`UrlCleaner`] with rules from a [reader][std::io::Read], most often a [`File`]
/// Construct a [`UrlCleaner`] with rules from a [reader][std::io::Read], most often a [`File`][std::fs::File]
/// # Errors
/// See [`Error`]
#[cfg(feature = "std")]
Expand Down Expand Up @@ -217,7 +218,7 @@ impl UrlCleaner {
/// Text outside of URLs is left unchanged.
///
/// # Errors
/// Alls errors encountered are returned in a [`Vec`].
/// Alls errors encountered are returned in a [`Vec`][alloc::vec::Vec].
#[cfg(feature = "linkify")]
pub fn clear_text<'a>(&self, s: &'a str) -> Result<Cow<'a, str>, alloc::vec::Vec<Error>> {
self.clear_text_with_linkfinder(s, &linkify::LinkFinder::new())
Expand All @@ -236,7 +237,7 @@ impl UrlCleaner {
/// Text outside of URLs is left unchanged.
///
/// # Errors
/// Alls errors encountered are returned in a [`Vec`].
/// Alls errors encountered are returned in a [`Vec`][alloc::vec::Vec].
#[cfg(feature = "linkify")]
pub fn clear_text_with_linkfinder<'a>(
&self,
Expand Down

0 comments on commit 37d41a4

Please sign in to comment.