File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -279,19 +279,18 @@ impl InterruptStatus {
279279
280280 /// Is the given interrupt bit set
281281 pub fn is_set ( & self , interrupt : u16 ) -> bool {
282- ( self . status [ interrupt as usize / 32 ] & ( 1 << interrupt as u32 % 32 ) ) != 0
282+ ( self . status [ interrupt as usize / 32 ] & ( 1 << ( interrupt as u32 % 32 ) ) ) != 0
283283 }
284284
285285 /// Set the given interrupt status bit
286286 pub fn set ( & mut self , interrupt : u16 ) {
287- self . status [ interrupt as usize / 32 ] =
288- self . status [ interrupt as usize / 32 ] | ( 1 << interrupt as u32 % 32 ) ;
287+ self . status [ interrupt as usize / 32 ] |= 1 << ( interrupt as u32 % 32 ) ;
289288 }
290289
291290 /// Return an iterator over the set interrupt status bits
292291 pub fn iterator ( & self ) -> InterruptStatusIterator {
293292 InterruptStatusIterator {
294- status : self . clone ( ) ,
293+ status : * self ,
295294 idx : 0 ,
296295 }
297296 }
You can’t perform that action at this time.
0 commit comments