Repositories

grarr

(mirrored on github)

Wim Looman <wim@nemo157.com>
df2e58 Make clippy optional
Wim Looman committed at 2016-03-01 22:07:35

Modified Cargo.toml

@@ -3,6 +3,9 @@ name = "grarr"
version = "0.0.3"
authors = ["Wim Looman <[email protected]>"]
[features]
default = ["clippy"]
[dependencies]
git-appraise = { git = "https://github.com/Nemo157/git-appraise-rs" }
@@ -27,6 +30,6 @@ gravatar = { git = "https://github.com/Nemo157/rust-gravatar", rev = "fix-type-r
maud = { git = "https://github.com/lfairy/maud" }
maud_macros = { git = "https://github.com/lfairy/maud" }
clippy = { version = "*" }
clippy = { version = "*", optional = true }
rust-crypto = { version = "*" }
unicase = { version = "*" }

Modified src/main.rs

@@ -1,5 +1,5 @@
#![feature(plugin)]
#![plugin(clippy)]
#![cfg_attr(feature = "clippy", plugin(clippy))]
#![plugin(maud_macros)]
#![warn(trivial_numeric_casts)]
#![warn(unsafe_code)]

Modified src/render/diff.rs

@@ -198,7 +198,7 @@ impl<'a> From<git2::DiffLine<'a>> for DiffLine {
}
}
#[allow(type_complexity)] // This is temporary till I figure out a nicer way to do this without all the allocation
#[cfg_attr(feature = "clippy", allow(type_complexity))] // This is temporary till I figure out a nicer way to do this without all the allocation
fn group(diff: &git2::Diff) -> Result<Vec<(DiffDelta, Vec<(DiffHunk, Vec<DiffLine>)>)>, git2::Error> {
let mut deltas = Vec::new();
let hunks = RefCell::new(Vec::new());

Modified src/settings.rs

@@ -53,7 +53,7 @@ impl Key for Settings {
}
impl Settings {
#[allow(single_match)] // Will have more in the future
#[cfg_attr(feature = "clippy", allow(single_match))] // Will have more in the future
pub fn with<'a, 'b, I: Iterator<Item=(&'a str, &'b str)>>(&self, settings: I) -> Settings {
let mut result = self.clone();
for (key, value) in settings {