From f4065b09b91f5d00efa5644915cdd83bfb7d393a Mon Sep 17 00:00:00 2001 From: Christian Vallentin Date: Tue, 1 Dec 2020 09:25:36 +0100 Subject: Fixed implicit borrow of expressions (#390) --- testing/tests/macro.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'testing/tests/macro.rs') diff --git a/testing/tests/macro.rs b/testing/tests/macro.rs index 51fbcdc..459b1e2 100644 --- a/testing/tests/macro.rs +++ b/testing/tests/macro.rs @@ -43,3 +43,13 @@ fn test_deep_import() { let t = DeepImportTemplate; assert_eq!(t.render().unwrap(), "foo"); } + +#[derive(Template)] +#[template(path = "macro-short-circuit.html")] +struct ShortCircuitTemplate {} + +#[test] +fn test_short_circuit() { + let t = ShortCircuitTemplate {}; + assert_eq!(t.render().unwrap(), "truetruetruefalsetruetrue"); +} -- cgit