diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -30,8 +30,6 @@ Examples: cat f - g Output f's contents, then standard input, then g's contents. cat Copy standard input to standard output."#; -const UNKNOWN_CHAR: &[u8; 2] = b"^?"; - pub fn run(cli: Cli) -> Result<()> { let stdout = std::io::stdout(); let mut writer = stdout.lock(); @@ -97,7 +95,7 @@ fn process_nonprinting(mut c: u8) -> Vec<u8> { match c { c @ 0..=31 => buf.extend([b'^', c + 64]), c @ 32..=126 => buf.push(c), - 127.. => buf.extend(UNKNOWN_CHAR), + 127.. => buf.extend(b"^?"), }; buf |