askama/testing/tests/ui/iso646.rs
René Kijewski 879d889bb2 Use ISO 646 alternative operators for bit ops
This change allows simplifying the use of filter expressions, because
you won't have to care about spaces around the `|` pipe operator.
2024-06-23 20:47:27 +02:00

47 lines
729 B
Rust

use rinja::Template;
#[derive(Template)]
#[template(ext = "txt", source = "{{ a & b }}")]
struct BitAnd {
a: u32,
b: u32,
}
#[derive(Template)]
#[template(ext = "txt", source = "{{ a bitand b }}")]
struct BitAndIso646 {
a: u32,
b: u32,
}
#[derive(Template)]
#[template(ext = "txt", source = "{{ a | b }}")]
struct BitOr {
a: u32,
b: u32,
}
#[derive(Template)]
#[template(ext = "txt", source = "{{ a bitor b }}")]
struct BitOrIso646 {
a: u32,
b: u32,
}
#[derive(Template)]
#[template(ext = "txt", source = "{{ a ^ b }}")]
struct Xor {
a: u32,
b: u32,
}
#[derive(Template)]
#[template(ext = "txt", source = "{{ a xor b }}")]
struct XorIso646 {
a: u32,
b: u32,
}
fn main() {
}