mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Replace deprecated inclusive pattern syntax (#1091)
I am currently using rustc 1.61.0-nightly (10913c000 2022-03-03). The original English blog is correct but this translation is deprecated.
This commit is contained in:
@@ -213,7 +213,7 @@ impl Writer {
|
||||
for byte in s.bytes() {
|
||||
match byte {
|
||||
// 可以是能打印的 ASCII 码字节,也可以是换行符
|
||||
0x20...0x7e | b'\n' => self.write_byte(byte),
|
||||
0x20..=0x7e | b'\n' => self.write_byte(byte),
|
||||
// 不包含在上述范围之内的字节
|
||||
_ => self.write_byte(0xfe),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user