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> {
54
54
let p_name = Ident :: new ( p. name . to_pascal_case ( ) ) ;
55
55
56
56
if let Some ( description) = p. description . as_ref ( ) {
57
- let comment = & format ! ( "{}" , respace( description) ) [ ..] ;
57
+ let comment = & respace ( description) [ ..] ;
58
58
items. push ( quote ! {
59
59
#[ doc = #comment]
60
60
} ) ;
@@ -350,7 +350,7 @@ impl U32Ext for u32 {
350
350
match * self {
351
351
1 ...8 => Ident :: new ( "u8" ) ,
352
352
9 ...16 => Ident :: new ( "u16" ) ,
353
- 16 ...32 => Ident :: new ( "u32" ) ,
353
+ 17 ...32 => Ident :: new ( "u32" ) ,
354
354
_ => panic ! ( "{}.to_ty()" , * self ) ,
355
355
}
356
356
}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ fn main() {
29
29
let d = svd:: parse ( xml) ;
30
30
match matches. value_of ( "peripheral" ) {
31
31
None => {
32
- for peripheral in d. peripherals . iter ( ) {
32
+ for peripheral in & d. peripherals {
33
33
println ! ( "const {}: usize = 0x{:08x};" ,
34
34
peripheral. name,
35
35
peripheral. base_address) ;
You can’t perform that action at this time.
0 commit comments