summaryrefslogtreecommitdiffstats
path: root/ranking
diff options
context:
space:
mode:
authorKornel <kornel@geekhood.net>2019-08-17 23:04:10 +0100
committerKornel <kornel@geekhood.net>2019-08-18 19:17:42 +0100
commit74d37ea054e41ab19f30210422197fc5e90a9a0a (patch)
tree47347a9f33240d498f413159d5815255440a96ac /ranking
parentd8804e6e9bf0778830c5b592df0bc8aae14d7821 (diff)
Cargo fix
Diffstat (limited to 'ranking')
-rw-r--r--ranking/src/lib_ranking.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/ranking/src/lib_ranking.rs b/ranking/src/lib_ranking.rs
index cfa9488..5fac726 100644
--- a/ranking/src/lib_ranking.rs
+++ b/ranking/src/lib_ranking.rs
@@ -83,7 +83,7 @@ pub struct Env {
pub max_crates: u32,
}
-fn cargo_toml_score(cr: &CrateVersionInputs) -> Score {
+fn cargo_toml_score(cr: &CrateVersionInputs<'_>) -> Score {
let mut s = Score::new();
s.frac("description len", 20, (cr.description.len() as f64 / 300.).min(1.));
@@ -261,7 +261,7 @@ fn authors_score(authors: &[Author], owners: &[CrateOwner], contributors: Option
s
}
-fn code_score(cr: &CrateVersionInputs) -> Score {
+fn code_score(cr: &CrateVersionInputs<'_>) -> Score {
let mut s = Score::new();
s.has("Non-trivial", 1, cr.total_code_lines > 700); // usually trivial/toy programs
s.has("Non-giant", 1, cr.total_code_lines < 80000); // these should be split into crates
@@ -270,7 +270,7 @@ fn code_score(cr: &CrateVersionInputs) -> Score {
s
}
-pub fn crate_score_version(cr: &CrateVersionInputs) -> Score {
+pub fn crate_score_version(cr: &CrateVersionInputs<'_>) -> Score {
let mut score = Score::new();
score.group("Cargo.toml", 2, cargo_toml_score(cr));
@@ -282,7 +282,7 @@ pub fn crate_score_version(cr: &CrateVersionInputs) -> Score {
score
}
-pub fn crate_score_temporal(cr: &CrateTemporalInputs) -> Score {
+pub fn crate_score_temporal(cr: &CrateTemporalInputs<'_>) -> Score {
let mut score = Score::new();
let newest = cr.versions.iter().max_by_key(|v| &v.created_at).expect("at least 1 ver?");