Skip to content

Commit

Permalink
run clippy in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkeldenker committed Mar 21, 2024
1 parent bdf93a6 commit 2258243
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions crates/core/src/ranking/signal/computer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,7 @@ impl SignalComputer {
}

pub fn region_count(&self) -> Option<&RegionCount> {
self.region_count
.as_ref()
.map(|region_count| &**region_count)
self.region_count.as_deref()
}

pub fn query_data(&self) -> Option<&QueryData> {
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/ranking/signal/non_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fn score_region(webpage_region: crate::webpage::Region, computer: &SignalCompute
}
}

fn host_id<'a>(fastfield_reader: &FieldReader<'a>) -> Option<NodeID> {
fn host_id(fastfield_reader: &FieldReader<'_>) -> Option<NodeID> {
let node_id = fastfield_reader
.get(schema::fast_field::HostNodeID.into())
.and_then(|n| n.as_u64())
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/check
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

cargo check
cargo check --no-default-features
cargo clippy -- -D warnings

cd crates/client-wasm && wasm-pack build --target web && cd -
cd frontend && npm install && npm run check && npm run lint

0 comments on commit 2258243

Please sign in to comment.