Skip to content

Commit 6ff0931

Browse files
authored
Merge pull request #75 from 9names/clippy_fixes
Apply clippy --fix for parens
2 parents 0e3555c + f83b1de commit 6ff0931

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pio-core/src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ impl InstructionOperands {
234234
panic!("Index for WaitSource::IRQ should be in range 0..=7");
235235
}
236236
(
237-
(*polarity) << 2 | (*source as u8),
237+
((*polarity) << 2) | (*source as u8),
238238
*index | (if *relative { 0b10000 } else { 0 }),
239239
)
240240
}
@@ -254,18 +254,18 @@ impl InstructionOperands {
254254
(*destination as u8, *bit_count & 0b11111)
255255
}
256256
InstructionOperands::PUSH { if_full, block } => {
257-
((*if_full as u8) << 1 | (*block as u8), 0)
257+
(((*if_full as u8) << 1) | (*block as u8), 0)
258258
}
259259
InstructionOperands::PULL { if_empty, block } => {
260-
(1 << 2 | (*if_empty as u8) << 1 | (*block as u8), 0)
260+
((1 << 2) | ((*if_empty as u8) << 1) | (*block as u8), 0)
261261
}
262262
InstructionOperands::MOV {
263263
destination,
264264
op,
265265
source,
266-
} => (*destination as u8, (*op as u8) << 3 | (*source as u8)),
267-
InstructionOperands::MOVTORX { fifo_index } => (0, 1 << 4 | *fifo_index as u8),
268-
InstructionOperands::MOVFROMRX { fifo_index } => (0b100, 1 << 4 | *fifo_index as u8),
266+
} => (*destination as u8, ((*op as u8) << 3) | (*source as u8)),
267+
InstructionOperands::MOVTORX { fifo_index } => (0, (1 << 4) | *fifo_index as u8),
268+
InstructionOperands::MOVFROMRX { fifo_index } => (0b100, (1 << 4) | *fifo_index as u8),
269269
InstructionOperands::IRQ {
270270
clear,
271271
wait,
@@ -276,8 +276,8 @@ impl InstructionOperands {
276276
panic!("invalid interrupt flags");
277277
}
278278
(
279-
(*clear as u8) << 1 | (*wait as u8),
280-
*index | (*index_mode as u8) << 3,
279+
((*clear as u8) << 1) | (*wait as u8),
280+
*index | ((*index_mode as u8) << 3),
281281
)
282282
}
283283
InstructionOperands::SET { destination, data } => {

0 commit comments

Comments
 (0)