advent-of-code/_templates/riddle/new/rust.ejs.t

39 lines
562 B
Perl
Raw Normal View History

2023-11-18 17:06:39 +01:00
---
to: <%= dir %>/rust/main.rs
unless_exists: true
---
2023-11-18 17:52:07 +01:00
#![feature(test)]
extern crate test;
#[cfg(test)]
mod tests {
use super::*;
use test::Bencher;
#[bench]
fn bench_a(b: &mut Bencher) {
b.iter(|| part_a());
}
#[bench]
fn bench_b(b: &mut Bencher) {
b.iter(|| part_b());
}
}
fn part_a() {
let result = include_str!("../input.txt");
println!("A: {}", result);
}
fn part_b() {
let result = include_str!("../input.txt");
println!("A: {}", result);
}
2023-11-18 17:06:39 +01:00
fn main() {
2023-11-18 17:52:07 +01:00
part_a();
part_b();
2023-11-18 17:06:39 +01:00
}