Merge pull request #394 from eZioPan/remove-clippy-warning
remove clippy warning and error from genrated files.
This commit is contained in:
commit
156c0ec278
@ -186,9 +186,9 @@ impl Gen {
|
|||||||
write!(
|
write!(
|
||||||
&mut data,
|
&mut data,
|
||||||
"
|
"
|
||||||
pub(crate) static PERIPHERALS: &'static [Peripheral] = {};
|
pub(crate) static PERIPHERALS: &[Peripheral] = {};
|
||||||
pub(crate) static INTERRUPTS: &'static [Interrupt] = {};
|
pub(crate) static INTERRUPTS: &[Interrupt] = {};
|
||||||
pub(crate) static DMA_CHANNELS: &'static [DmaChannel] = {};
|
pub(crate) static DMA_CHANNELS: &[DmaChannel] = {};
|
||||||
",
|
",
|
||||||
stringify(&core.peripherals),
|
stringify(&core.peripherals),
|
||||||
stringify(&core.interrupts),
|
stringify(&core.interrupts),
|
||||||
@ -329,6 +329,16 @@ impl Gen {
|
|||||||
.join(format!("{}_{}.rs", module, version)),
|
.join(format!("{}_{}.rs", module, version)),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
// Allow a few warning
|
||||||
|
file.write_all(
|
||||||
|
b"#![allow(clippy::missing_safety_doc)]
|
||||||
|
#![allow(clippy::identity_op)]
|
||||||
|
#![allow(clippy::unnecessary_cast)]
|
||||||
|
#![allow(clippy::erasing_op)]",
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
let data = items.to_string().replace("] ", "]\n");
|
let data = items.to_string().replace("] ", "]\n");
|
||||||
|
|
||||||
// Remove inner attributes like #![no_std]
|
// Remove inner attributes like #![no_std]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user