diff --git a/crates/core/src/ranking/signal/computer/mod.rs b/crates/core/src/ranking/signal/computer/mod.rs index 75dd423f..faf73111 100644 --- a/crates/core/src/ranking/signal/computer/mod.rs +++ b/crates/core/src/ranking/signal/computer/mod.rs @@ -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> { diff --git a/crates/core/src/ranking/signal/non_text.rs b/crates/core/src/ranking/signal/non_text.rs index 098d1e99..20de67f8 100644 --- a/crates/core/src/ranking/signal/non_text.rs +++ b/crates/core/src/ranking/signal/non_text.rs @@ -88,7 +88,7 @@ fn score_region(webpage_region: crate::webpage::Region, computer: &SignalCompute } } -fn host_id<'a>(fastfield_reader: &FieldReader<'a>) -> Option { +fn host_id(fastfield_reader: &FieldReader<'_>) -> Option { let node_id = fastfield_reader .get(schema::fast_field::HostNodeID.into()) .and_then(|n| n.as_u64()) diff --git a/scripts/ci/check b/scripts/ci/check index 47f57e4f..fc565896 100755 --- a/scripts/ci/check +++ b/scripts/ci/check @@ -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