hi clubby

This commit is contained in:
nora 2024-12-01 13:34:16 +01:00
parent 3490086a7f
commit 1b194e4f1c
5 changed files with 187 additions and 1 deletions

24
helper/src/hash.rs Normal file
View file

@ -0,0 +1,24 @@
use std::hash::Hasher;
#[derive(Default)]
pub struct NoHasher {
value: u64,
}
impl Hasher for NoHasher {
fn finish(&self) -> u64 {
self.value
}
fn write_u32(&mut self, i: u32) {
self.value = i as u64;
}
fn write_u64(&mut self, i: u64) {
self.value = i;
}
fn write(&mut self, _: &[u8]) {
unimplemented!()
}
}

View file

@ -1,10 +1,12 @@
mod cmd;
mod ext;
mod hash;
use std::{borrow::Cow, fmt::Debug};
pub use self::cmd::main;
pub use self::ext::*;
pub use self::hash::*;
pub type Solution = fn(&str) -> u64;