Browse Source

cargo clippy - only select warnings, left some in

develop
petr-tik 5 years ago
parent
commit
5cc23d153c
2 changed files with 2 additions and 3 deletions
  1. +0
    -1
      src/commands/new.rs
  2. +2
    -2
      src/commands/serve.rs

+ 0
- 1
src/commands/new.rs View File

@@ -29,7 +29,6 @@ fn prompt_input<P: Fn(&str) -> Result<(), String>>(prompt_text: &str, predicate:
let mut buffer = String::new(); let mut buffer = String::new();
io::stdin() io::stdin()
.read_line(&mut buffer) .read_line(&mut buffer)
.ok()
.expect("Failed to read line"); .expect("Failed to read line");
let answer = buffer.trim_end().to_string(); let answer = buffer.trim_end().to_string();
match predicate(&answer) { match predicate(&answer) {


+ 2
- 2
src/commands/serve.rs View File

@@ -104,7 +104,7 @@ impl IndexServer {
} }
} }


fn create_hit(&self, score: Score, doc: &Document, doc_address: &DocAddress) -> Hit {
fn create_hit(&self, score: Score, doc: &Document, doc_address: DocAddress) -> Hit {
Hit { Hit {
score, score,
doc: self.schema.to_named_doc(&doc), doc: self.schema.to_named_doc(&doc),
@@ -129,7 +129,7 @@ impl IndexServer {
.iter() .iter()
.map(|(score, doc_address)| { .map(|(score, doc_address)| {
let doc: Document = searcher.doc(*doc_address).unwrap(); let doc: Document = searcher.doc(*doc_address).unwrap();
self.create_hit(*score, &doc, doc_address)
self.create_hit(*score, &doc, *doc_address)
}) })
.collect() .collect()
}; };


Loading…
Cancel
Save