Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
epi052 committed Mar 30, 2024
1 parent 8b2fe8b commit 4e5d6aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/filters/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ fn remove_function_works_as_expected() {

assert_eq!(data.filters.read().unwrap().len(), 5);

let expected = vec![
let expected = [
WordsFilter { word_count: 1 },
WordsFilter { word_count: 3 },
WordsFilter { word_count: 5 },
Expand Down
4 changes: 1 addition & 3 deletions src/nlp/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ impl Document {

let html = Html::parse_document(raw_html);

let Some(element) = html.select(&selector).next() else {
return None;
};
let element = html.select(&selector).next()?;

let text = element
.descendants()
Expand Down
2 changes: 1 addition & 1 deletion src/url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ mod tests {
let pdf = Url::parse("http://localhost/turbo.pdf").unwrap();
let tar = Url::parse("http://localhost/turbo.tar.gz").unwrap();

let expected = vec![
let expected = [
vec![base.clone(), js.clone()],
vec![base.clone(), js.clone(), php.clone()],
vec![base.clone(), js.clone(), php.clone(), pdf.clone()],
Expand Down

0 comments on commit 4e5d6aa

Please sign in to comment.