diff options
author | Yusuke Sasaki <yusuke.sasaki.nuem@gmail.com> | 2018-11-04 18:04:28 +0900 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-11-04 22:14:11 +0100 |
commit | 82a406df795e2645c83d9ec0974f1f0421337d9b (patch) | |
tree | c42d240e54dc9fd66b6a55034fad72d3d4a91c62 /testing | |
parent | efe621195e3e2459275e4985659c8b0158d0b880 (diff) | |
download | askama-82a406df795e2645c83d9ec0974f1f0421337d9b.tar.gz askama-82a406df795e2645c83d9ec0974f1f0421337d9b.tar.bz2 askama-82a406df795e2645c83d9ec0974f1f0421337d9b.zip |
use UFCS in derived code
Diffstat (limited to 'testing')
-rw-r--r-- | testing/tests/simple.rs | 12 |
1 files changed, 12 insertions, 0 deletions
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"); + } +} |