File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ pub fn interrupt(peripherals: &[Peripheral], items: &mut Vec<Tokens>) {
46
46
. map ( |i| ( i. value , i) )
47
47
. collect :: < HashMap < _ , _ > > ( ) ;
48
48
49
- let mut interrupts = interrupts. into_iter ( ) . map ( |( _, v) | v) . collect :: < Vec < _ > > ( ) ;
49
+ let mut interrupts =
50
+ interrupts. into_iter ( ) . map ( |( _, v) | v) . collect :: < Vec < _ > > ( ) ;
50
51
interrupts. sort_by_key ( |i| i. value ) ;
51
52
52
53
let mut fields = vec ! [ ] ;
@@ -84,10 +85,13 @@ pub fn interrupt(peripherals: &[Peripheral], items: &mut Vec<Tokens>) {
84
85
85
86
let name = Ident :: new ( & * interrupt. name . to_sanitized_snake_case ( ) ) ;
86
87
let name_pc = Ident :: new ( interrupt. name . to_sanitized_pascal_case ( ) ) ;
87
- let description = interrupt. description
88
- . as_ref ( )
89
- . map ( |s| util:: respace ( s) )
90
- . unwrap_or_else ( || interrupt. name . clone ( ) ) ;
88
+ let description =
89
+ format ! ( "{} - {}" ,
90
+ interrupt. value,
91
+ interrupt. description
92
+ . as_ref( )
93
+ . map( |s| util:: respace( s) )
94
+ . unwrap_or_else( || interrupt. name. clone( ) ) ) ;
91
95
fields. push ( quote ! {
92
96
#[ doc = #description]
93
97
pub #name: extern "C" fn ( #name_pc) ,
You can’t perform that action at this time.
0 commit comments