Skip to content

Commit 5dc74c6

Browse files
author
Jiajie Chen
committed
Use ..= instead of ...
1 parent 5f9cbc7 commit 5dc74c6

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

kernel/src/arch/x86_64/interrupt/handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub extern "C" fn rust_trap(tf: &mut TrapFrame) {
8686
Breakpoint => breakpoint(),
8787
DoubleFault => double_fault(tf),
8888
PageFault => page_fault(tf),
89-
IRQ0...63 => {
89+
IRQ0..=63 => {
9090
let irq = tf.trap_num as u8 - IRQ0;
9191
super::ack(irq); // must ack before switching
9292
match irq {

kernel/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#![deny(unused_must_use)]
1111
#![deny(stable_features)]
1212
#![deny(unused_unsafe)]
13+
#![deny(ellipsis_inclusive_range_patterns)]
1314
#![no_std]
1415

1516
// just keep it ...

kernel/src/util/escape_parser.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ impl CharacterAttribute {
4545
24 => self.underline = false,
4646
27 => self.reverse = false,
4747
29 => self.strikethrough = false,
48-
30...37 | 90...97 => self.foreground = ConsoleColor::from_console_code(code).unwrap(),
49-
40...47 | 100...107 => {
48+
30..=37 | 90..=97 => self.foreground = ConsoleColor::from_console_code(code).unwrap(),
49+
40..=47 | 100..=107 => {
5050
self.background = ConsoleColor::from_console_code(code - 10).unwrap()
5151
}
5252
_ => { /* unimplemented!() */ }
@@ -136,7 +136,7 @@ impl EscapeParser {
136136
_ => { /* unimplemented!() */ }
137137
},
138138
ParseStatus::ParsingCSI => match byte {
139-
b'0'...b'9' => {
139+
b'0'..=b'9' => {
140140
let digit = (byte - b'0') as u32;
141141
let param = self.current_param.unwrap_or(0) as u32;
142142
let res = param * 10 + digit;
@@ -150,7 +150,7 @@ impl EscapeParser {
150150
return None;
151151
}
152152
// @A–Z[\]^_`a–z{|}~
153-
0x40...0x7E => {
153+
0x40..=0x7E => {
154154
if let Some(param) = self.current_param {
155155
self.params.push(param).unwrap();
156156
}

0 commit comments

Comments
 (0)