(deps) replace hexyl with hexhex (#18)
Since we don't want to add too many dependencies for now, use our own small hexdump lib `hexhex` instead of `hexyl`. Reviewed-on: #18 Co-authored-by: ddidderr <ddidderr@paul.network> Co-committed-by: ddidderr <ddidderr@paul.network>
This commit is contained in:
@ -3,6 +3,7 @@ use std::sync::mpsc;
|
||||
use std::thread::{self, JoinHandle};
|
||||
|
||||
mod proto;
|
||||
use hexhex::print_hex;
|
||||
use proto::DNSHeader;
|
||||
|
||||
fn listen() -> (
|
||||
@ -32,13 +33,6 @@ fn listen() -> (
|
||||
)
|
||||
}
|
||||
|
||||
fn print_hex(bytes: &[u8]) {
|
||||
let stdout = std::io::stdout();
|
||||
let mut stdout = stdout.lock();
|
||||
let mut hxp = hexyl::Printer::new(&mut stdout, true, hexyl::BorderStyle::None, false);
|
||||
let _ = hxp.print_all(bytes);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let (thread_udp, _thread_udp_tx, thread_udp_rx) = listen();
|
||||
|
||||
|
Reference in New Issue
Block a user