From 82a406df795e2645c83d9ec0974f1f0421337d9b Mon Sep 17 00:00:00 2001 From: Yusuke Sasaki Date: Sun, 4 Nov 2018 18:04:28 +0900 Subject: use UFCS in derived code --- testing/tests/simple.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'testing/tests') diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index d4d2964..2bf8e7a 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -289,3 +289,15 @@ struct Empty; fn test_empty() { assert_eq!(Empty.render().unwrap(), "foo"); } + +mod without_import_on_derive { + #[derive(askama::Template)] + #[template(source = "foo", ext = "txt")] + struct WithoutImport; + + #[test] + fn test_without_import() { + use askama::Template; + assert_eq!(WithoutImport.render().unwrap(), "foo"); + } +} -- cgit