Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pfoerster committed Dec 28, 2019
1 parent ec5bc17 commit f3b57a1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ target/
/.idea
tarpaulin-report.html
crates/**/Cargo.lock
crates/texlab_citeproc/src/name/parser.rs
5 changes: 1 addition & 4 deletions crates/texlab_citeproc/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
fn main() {
lalrpop::Configuration::new()
.generate_in_source_tree()
.process()
.unwrap();
lalrpop::process_root().unwrap();
}
5 changes: 4 additions & 1 deletion crates/texlab_citeproc/src/name/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Ported from: https://github.com/michel-kraemer/citeproc-java/blob/master/citeproc-java/grammars/InternalName.g4
// Michel Kraemer
// Apache License 2.0
mod parser;
mod parser {
#![allow(warnings)]
include!(concat!(env!("OUT_DIR"), "/name/parser.rs"));
}

use self::parser::NamesParser;
use citeproc_io::Name;
Expand Down
4 changes: 2 additions & 2 deletions crates/texlab_citeproc/src/ris.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ impl RisLibrary {
continue;
}

let key: String = (&chars[..2]).into_iter().collect();
let value: String = (&chars[6..]).into_iter().collect();
let key: String = (&chars[..2]).iter().collect();
let value: String = (&chars[6..]).iter().collect();
match key.to_uppercase().as_str() {
"TY" => reference.ty = RisType::parse(&value),
"A2" => reference.editors.push(value),
Expand Down

0 comments on commit f3b57a1

Please sign in to comment.