File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ pub fn gen_peripheral(p: &Peripheral, d: &Defaults) -> Vec<Tokens> {
5454 let p_name = Ident :: new ( p. name . to_pascal_case ( ) ) ;
5555
5656 if let Some ( description) = p. description . as_ref ( ) {
57- let comment = & format ! ( "{}" , respace( description) ) [ ..] ;
57+ let comment = & respace ( description) [ ..] ;
5858 items. push ( quote ! {
5959 #[ doc = #comment]
6060 } ) ;
@@ -350,7 +350,7 @@ impl U32Ext for u32 {
350350 match * self {
351351 1 ...8 => Ident :: new ( "u8" ) ,
352352 9 ...16 => Ident :: new ( "u16" ) ,
353- 16 ...32 => Ident :: new ( "u32" ) ,
353+ 17 ...32 => Ident :: new ( "u32" ) ,
354354 _ => panic ! ( "{}.to_ty()" , * self ) ,
355355 }
356356 }
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ fn main() {
2929 let d = svd:: parse ( xml) ;
3030 match matches. value_of ( "peripheral" ) {
3131 None => {
32- for peripheral in d. peripherals . iter ( ) {
32+ for peripheral in & d. peripherals {
3333 println ! ( "const {}: usize = 0x{:08x};" ,
3434 peripheral. name,
3535 peripheral. base_address) ;
You can’t perform that action at this time.
0 commit comments