1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-26 06:42:12 +03:00

tmux-cc: fix suspicious-looking decimal literals

Clippy complained that these were decimal literals, not octal literals. Add the `0o` prefix to make them such.
This commit is contained in:
Waleed Khan 2021-10-26 18:18:42 -07:00 committed by Wez Furlong
parent cf1c4240c2
commit 539d72a97f

View File

@ -412,22 +412,22 @@ fn unvis(s: &str) -> anyhow::Result<String> {
if b == b'-' {
*state = State::Meta1;
} else if b == b'^' {
*state = State::Ctrl(0200);
*state = State::Ctrl(0o200);
} else {
anyhow::bail!("invalid \\M escape: {}", b);
}
}
State::Meta1 => {
result.push(b | 0200);
result.push(b | 0o200);
*state = State::Ground;
}
State::Ctrl(c) => {
if b == b'?' {
result.push(*c | 0177);
result.push(*c | 0o177);
} else {
result.push((b & 037) | *c);
result.push((b & 0o37) | *c);
}
*state = State::Ground;
}