base32, base64, uucore: merge base32/base64 code

This commit is contained in:
Alex Lyon 2019-02-21 05:10:12 -08:00 committed by Roy Ivy III
parent 6600993c3e
commit 4e0025cb17
2 changed files with 3 additions and 2 deletions

View file

@ -104,9 +104,9 @@ impl<R: Read> Data<R> {
} }
// NOTE: this will likely be phased out at some point // NOTE: this will likely be phased out at some point
pub fn wrap_print(line_wrap: usize, res: String) { pub fn wrap_print<R: Read>(data: &Data<R>, res: String) {
let stdout = io::stdout(); let stdout = io::stdout();
wrap_write(stdout.lock(), line_wrap, res).unwrap(); wrap_write(stdout.lock(), data.line_wrap, res).unwrap();
} }
pub fn wrap_write<W: Write>(mut writer: W, line_wrap: usize, res: String) -> io::Result<()> { pub fn wrap_write<W: Write>(mut writer: W, line_wrap: usize, res: String) -> io::Result<()> {

View file

@ -11,6 +11,7 @@
macro_rules! executable( macro_rules! executable(
() => ({ () => ({
let module = module_path!(); let module = module_path!();
let module = module.split("::").next().unwrap_or(module);
if &module[0..3] == "uu_" { if &module[0..3] == "uu_" {
&module[3..] &module[3..]
} else { } else {