// Copyright 2015 Ted Mielczarek. See the COPYRIGHT
// file at the top-level directory of this distribution.
//! General-purpose I/O routines.
usestd::io;usestd::io::prelude::*;/// Shorthand for Read + Seek
pubtraitReadable: Read + Seek {}impl<T: Read + Seek> Readable forT{}/// Format `bytes` to `f` as a hex string.
pubfnwrite_bytes<T: Write>(f:&mut T, bytes:&[u8])->io::Result<()>{for b in bytes {write!(f,"{:02x}", b)?;}Ok(())}