From ea2034e8062f8db6b5ae74ca8aeab4e2ee08479f Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 2 Jan 2020 21:21:28 +0100 Subject: Clean up clippy warnings --- testing/tests/filters.rs | 4 +++- testing/tests/matches.rs | 2 ++ testing/tests/operators.rs | 2 ++ testing/tests/simple.rs | 2 ++ testing/tests/vars.rs | 2 ++ 5 files changed, 11 insertions(+), 1 deletion(-) (limited to 'testing/tests') diff --git a/testing/tests/filters.rs b/testing/tests/filters.rs index 4579afe..b02a64b 100644 --- a/testing/tests/filters.rs +++ b/testing/tests/filters.rs @@ -1,3 +1,5 @@ +#![allow(clippy::blacklisted_name)] + #[cfg(feature = "serde-json")] #[macro_use] extern crate serde_json; @@ -44,7 +46,7 @@ struct MyFilterTemplate<'a> { mod filters { pub fn myfilter(s: &str) -> ::askama::Result { - Ok(s.replace("oo", "aa").to_string()) + Ok(s.replace("oo", "aa")) } // for test_nested_filter_ref pub fn mytrim(s: &dyn (::std::fmt::Display)) -> ::askama::Result { diff --git a/testing/tests/matches.rs b/testing/tests/matches.rs index 8657fa5..3e6d636 100644 --- a/testing/tests/matches.rs +++ b/testing/tests/matches.rs @@ -1,3 +1,5 @@ +#![allow(clippy::blacklisted_name)] + use askama::Template; #[derive(Template)] diff --git a/testing/tests/operators.rs b/testing/tests/operators.rs index d6c3cae..99a2a4c 100644 --- a/testing/tests/operators.rs +++ b/testing/tests/operators.rs @@ -1,3 +1,5 @@ +#![allow(clippy::blacklisted_name)] + use askama::Template; #[derive(Template)] diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index a311e90..6dbfcfb 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -1,3 +1,5 @@ +#![allow(clippy::blacklisted_name)] + use askama::{SizedTemplate, Template}; use std::collections::HashMap; diff --git a/testing/tests/vars.rs b/testing/tests/vars.rs index 0e1e367..3af41c6 100644 --- a/testing/tests/vars.rs +++ b/testing/tests/vars.rs @@ -1,3 +1,5 @@ +#![allow(clippy::useless_let_if_seq)] + use askama::Template; #[derive(Template)] -- cgit