Remove unused eprintln macro and hex dump function.

This commit is contained in:
Paul Lietar 2016-04-24 09:50:55 +01:00
parent 2a5fd26998
commit 8bbed4c162

View file

@ -16,36 +16,10 @@ pub use util::spotify_id::{SpotifyId, FileId};
pub use util::arcvec::ArcVec; pub use util::arcvec::ArcVec;
pub use util::subfile::Subfile; pub use util::subfile::Subfile;
#[macro_export]
macro_rules! eprintln(
($($arg:tt)*) => (
{
use std::io::Write;
writeln!(&mut ::std::io::stderr(), $($arg)* ).unwrap()
}
)
);
#[macro_export]
macro_rules! eprint(
($($arg:tt)*) => (
{
use std::io::Write;
write!(&mut ::std::io::stderr(), $($arg)* ).unwrap()
}
)
);
pub fn rand_vec<G: Rng, R: Rand>(rng: &mut G, size: usize) -> Vec<R> { pub fn rand_vec<G: Rng, R: Rand>(rng: &mut G, size: usize) -> Vec<R> {
rng.gen_iter().take(size).collect() rng.gen_iter().take(size).collect()
} }
pub fn hexdump(data: &[u8]) {
for b in data.iter() {
eprint!("{:02X} ", b);
}
eprintln!("");
}
pub trait IgnoreExt { pub trait IgnoreExt {
fn ignore(self); fn ignore(self);
} }