diff options
author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-01-03 15:20:50 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2024-01-10 10:42:31 +0100 |
commit | 1ee067f2b62a994fe1200fba8898e8909acd0ce0 (patch) | |
tree | 151c9f5bbc7e1949b1ce28ee8b55a0c2be947946 /askama_derive/src | |
parent | 50c64bc8650574d1e9243a50477eb7dbd36e36c4 (diff) | |
download | askama-1ee067f2b62a994fe1200fba8898e8909acd0ce0.tar.gz askama-1ee067f2b62a994fe1200fba8898e8909acd0ce0.tar.bz2 askama-1ee067f2b62a994fe1200fba8898e8909acd0ce0.zip |
Revert "Add automatic borrowing to let statement"
This reverts commit 3d52283b74573af509deb3c47cbabf7b7b58b1dd.
Diffstat (limited to 'askama_derive/src')
-rw-r--r-- | askama_derive/src/generator.rs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs index 760a1f6..0f9a2af 100644 --- a/askama_derive/src/generator.rs +++ b/askama_derive/src/generator.rs @@ -916,14 +916,7 @@ impl<'a> Generator<'a> { }; let mut expr_buf = Buffer::new(0); - let borrow_val = !is_copyable(val); - if borrow_val { - expr_buf.write("&("); - } self.visit_expr(&mut expr_buf, val)?; - if borrow_val { - expr_buf.write(")"); - } let shadowed = self.is_shadowing_variable(&l.var)?; if shadowed { |