@@ -28,10 +28,7 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream {
2828 && f. sig . variadic . is_none ( )
2929 && match f. sig . output {
3030 ReturnType :: Default => false ,
31- ReturnType :: Type ( _, ref ty) => match * * ty {
32- Type :: Never ( _) => true ,
33- _ => false ,
34- } ,
31+ ReturnType :: Type ( _, ref ty) => matches ! ( * * ty, Type :: Never ( _) ) ,
3532 } ;
3633
3734 if !valid_signature {
@@ -159,7 +156,7 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream {
159156 Exception :: DefaultHandler | Exception :: HardFault | Exception :: NonMaskableInt => {
160157 // These are unsafe to define.
161158 let name = if exn == Exception :: DefaultHandler {
162- format ! ( "`DefaultHandler`" )
159+ "`DefaultHandler`" . to_string ( )
163160 } else {
164161 format ! ( "`{:?}` handler" , exn)
165162 } ;
@@ -252,10 +249,7 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream {
252249 && f. sig . variadic . is_none ( )
253250 && match f. sig . output {
254251 ReturnType :: Default => false ,
255- ReturnType :: Type ( _, ref ty) => match * * ty {
256- Type :: Never ( _) => true ,
257- _ => false ,
258- } ,
252+ ReturnType :: Type ( _, ref ty) => matches ! ( * * ty, Type :: Never ( _) ) ,
259253 } ;
260254
261255 if !valid_signature {
@@ -557,7 +551,7 @@ fn extract_static_muts(
557551 let mut seen = HashSet :: new ( ) ;
558552 let mut statics = vec ! [ ] ;
559553 let mut stmts = vec ! [ ] ;
560- while let Some ( stmt) = istmts. next ( ) {
554+ for stmt in istmts. by_ref ( ) {
561555 match stmt {
562556 Stmt :: Item ( Item :: Static ( var) ) => {
563557 if var. mutability . is_some ( ) {
@@ -622,7 +616,7 @@ fn check_attr_whitelist(attrs: &[Attribute], caller: WhiteListCaller) -> Result<
622616
623617 ' o: for attr in attrs {
624618 for val in whitelist {
625- if eq ( & attr, & val) {
619+ if eq ( attr, val) {
626620 continue ' o;
627621 }
628622 }
0 commit comments