summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 8838b26..92c8b3a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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