Can apply wasm to merged events, also for binned queries
This commit is contained in:
10
crates/netpod/src/hex.rs
Normal file
10
crates/netpod/src/hex.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
/// Input may also contain whitespace.
|
||||
pub fn decode_hex<INP: AsRef<str>>(inp: INP) -> Result<Vec<u8>, ()> {
|
||||
let a: Vec<_> = inp
|
||||
.as_ref()
|
||||
.bytes()
|
||||
.filter(|&x| (x >= b'0' && x <= b'9') || (x >= b'a' && x <= b'f'))
|
||||
.collect();
|
||||
let ret = hex::decode(a).map_err(|_| ())?;
|
||||
Ok(ret)
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
pub mod hex;
|
||||
pub mod histo;
|
||||
pub mod query;
|
||||
pub mod range;
|
||||
|
||||
Reference in New Issue
Block a user