(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:
2022-05-08 14:39:29 +02:00
committed by mice_on_drugs
parent 67608177b0
commit 623a82c2fe
3 changed files with 6 additions and 192 deletions

View File

@ -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();