diff options
author | vallentin <mail@vallentin.dev> | 2021-01-02 23:02:59 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2021-01-05 16:17:14 +0100 |
commit | b76f7ef778dd37db08cb4dba2dc9329b15bbe984 (patch) | |
tree | f12a3086ce2b5d5af9ed4ff6274c1fd44b3c2e1c /testing | |
parent | c2102d4d1f33fda499bccb09f77ea9cbd72f2018 (diff) | |
download | askama-b76f7ef778dd37db08cb4dba2dc9329b15bbe984.tar.gz askama-b76f7ef778dd37db08cb4dba2dc9329b15bbe984.tar.bz2 askama-b76f7ef778dd37db08cb4dba2dc9329b15bbe984.zip |
Removed implicit borrowing of literals, calls, and more (fixes #404)
Diffstat (limited to 'testing')
-rw-r--r-- | testing/tests/simple.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index 5ef03b1..0c6b17e 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -265,7 +265,7 @@ fn test_slice_literal() { #[derive(Template)] #[template(source = "Hello, {{ world(\"123\", 4) }}!", ext = "txt")] struct FunctionRefTemplate { - world: fn(s: &str, v: &u8) -> String, + world: fn(s: &str, v: u8) -> String, } #[test] @@ -277,7 +277,7 @@ fn test_func_ref_call() { } #[allow(clippy::trivially_copy_pass_by_ref)] -fn world2(s: &str, v: &u8) -> String { +fn world2(s: &str, v: u8) -> String { format!("world{}{}", v, s) } @@ -291,7 +291,7 @@ fn test_path_func_call() { } #[derive(Template)] -#[template(source = "{{ ::std::string::ToString::to_string(123) }}", ext = "txt")] +#[template(source = "{{ ::std::string::String::from(\"123\") }}", ext = "txt")] struct RootPathFunctionTemplate; #[test] @@ -305,7 +305,7 @@ struct FunctionTemplate; impl FunctionTemplate { #[allow(clippy::trivially_copy_pass_by_ref)] - fn world3(&self, s: &str, v: &u8) -> String { + fn world3(&self, s: &str, v: u8) -> String { format!("world{}{}", s, v) } } |