diff options
author | René Kijewski <kijewski@library.vetmed.fu-berlin.de> | 2022-01-05 19:23:26 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2022-01-06 13:05:24 +0100 |
commit | 7f1cd3dfc7ed72b9cd31a53774c5aec019287ea0 (patch) | |
tree | 6ad710f42009a65c5bb43b7d4e95aa5dea04b661 | |
parent | e34a81ccb966e58e97cb24b1b60141e14f073924 (diff) | |
download | askama-7f1cd3dfc7ed72b9cd31a53774c5aec019287ea0.tar.gz askama-7f1cd3dfc7ed72b9cd31a53774c5aec019287ea0.tar.bz2 askama-7f1cd3dfc7ed72b9cd31a53774c5aec019287ea0.zip |
No need to build a String when it gets referenced as &str implicitly
-rw-r--r-- | askama_shared/src/filters/mod.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/askama_shared/src/filters/mod.rs b/askama_shared/src/filters/mod.rs index 66a0ee2..35bdd5a 100644 --- a/askama_shared/src/filters/mod.rs +++ b/askama_shared/src/filters/mod.rs @@ -570,16 +570,10 @@ mod tests { assert_eq!(join(empty.iter(), ", ").unwrap(), ""); let input: Vec<String> = vec!["foo".into(), "bar".into(), "bazz".into()]; - assert_eq!( - join((&input).iter(), ":".to_string()).unwrap(), - "foo:bar:bazz" - ); assert_eq!(join(input.iter(), ":").unwrap(), "foo:bar:bazz"); - assert_eq!(join(input.iter(), ":".to_string()).unwrap(), "foo:bar:bazz"); let input: &[String] = &["foo".into(), "bar".into()]; assert_eq!(join(input.iter(), ":").unwrap(), "foo:bar"); - assert_eq!(join(input.iter(), ":".to_string()).unwrap(), "foo:bar"); let real: String = "blah".into(); let input: Vec<&str> = vec![&real]; |