summaryrefslogtreecommitdiffstats
path: root/crate_db/src/lib_crate_db.rs
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 /crate_db/src/lib_crate_db.rs
parentd8804e6e9bf0778830c5b592df0bc8aae14d7821 (diff)
Cargo fix
Diffstat (limited to 'crate_db/src/lib_crate_db.rs')
-rw-r--r--crate_db/src/lib_crate_db.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crate_db/src/lib_crate_db.rs b/crate_db/src/lib_crate_db.rs
index 08e19a5..fa3d217 100644
--- a/crate_db/src/lib_crate_db.rs
+++ b/crate_db/src/lib_crate_db.rs
@@ -219,7 +219,7 @@ impl CrateDb {
/// Add data of the latest version of a crate to the index
/// Score is a ranking of a crate (0 = bad, 1 = great)
- pub fn index_latest(&self, c: CrateVersionData) -> FResult<()> {
+ pub fn index_latest(&self, c: CrateVersionData<'_>) -> FResult<()> {
let origin = c.origin.to_str();
let manifest = &c.manifest;
@@ -416,7 +416,7 @@ impl CrateDb {
/// (rank-relevance, relevance, slug)
///
/// Rank relevance is normalized and biased towards one top category
- fn extract_crate_categories(&self, conn: &Connection, c: &CrateVersionData, keywords: impl Iterator<Item=String>, is_important_ish: bool) -> FResult<(Vec<(f64, f64, String)>, bool)> {
+ fn extract_crate_categories(&self, conn: &Connection, c: &CrateVersionData<'_>, keywords: impl Iterator<Item=String>, is_important_ish: bool) -> FResult<(Vec<(f64, f64, String)>, bool)> {
let (explicit_categories, invalid_categories): (Vec<_>, Vec<_>) = c.category_slugs.iter().map(|c| c.to_string())
.partition(|slug| {
categories::CATEGORIES.from_slug(&slug).next().is_some() // FIXME: that checks top level only
@@ -979,7 +979,7 @@ impl CrateDb {
}
// returns an array of lowercase phrases
- fn extract_text_phrases(c: &CrateVersionData) -> Vec<(f64, String)> {
+ fn extract_text_phrases(c: &CrateVersionData<'_>) -> Vec<(f64, String)> {
let mut out = Vec::new();
let mut len = 0;
if let Some(s) = &c.manifest.package().description {