File tree Expand file tree Collapse file tree 2 files changed +19
-16
lines changed Expand file tree Collapse file tree 2 files changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -8,22 +8,25 @@ pub fn get_attributes(attrs: &[Attribute]) -> Result<Vec<(Path, Lit)>> {
8
8
continue ;
9
9
}
10
10
11
- if let Err ( _) = attribute. parse_nested_meta ( |meta| {
12
- let path = meta. path . clone ( ) ;
13
- let lit = meta
14
- . value ( )
15
- . ok ( )
16
- . map ( |v| v. parse ( ) )
17
- . transpose ( ) ?
18
- . unwrap_or ( Lit :: from ( LitBool {
19
- value : true ,
20
- span : path. span ( ) ,
21
- } ) ) ;
11
+ if attribute
12
+ . parse_nested_meta ( |meta| {
13
+ let path = meta. path . clone ( ) ;
14
+ let lit = meta
15
+ . value ( )
16
+ . ok ( )
17
+ . map ( |v| v. parse ( ) )
18
+ . transpose ( ) ?
19
+ . unwrap_or ( Lit :: from ( LitBool {
20
+ value : true ,
21
+ span : path. span ( ) ,
22
+ } ) ) ;
22
23
23
- attributes. push ( ( path, lit) ) ;
24
+ attributes. push ( ( path, lit) ) ;
24
25
25
- Ok ( ( ) )
26
- } ) {
26
+ Ok ( ( ) )
27
+ } )
28
+ . is_err ( )
29
+ {
27
30
return Err ( Error :: new_spanned (
28
31
attribute,
29
32
"Attributes should be of type: #[table(key = \" value\" , ..)] or #[table(bool)]" ,
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ impl<'a> Buffers<'a> {
51
51
}
52
52
}
53
53
54
- impl < ' a > Write for Buffers < ' a > {
54
+ impl Write for Buffers < ' _ > {
55
55
fn write ( & mut self , buf : & [ u8 ] ) -> Result < usize > {
56
56
if let Some ( ref mut current_buffer) = self . current_buffer {
57
57
current_buffer. write ( buf)
@@ -73,7 +73,7 @@ impl<'a> Write for Buffers<'a> {
73
73
}
74
74
}
75
75
76
- impl < ' a > WriteColor for Buffers < ' a > {
76
+ impl WriteColor for Buffers < ' _ > {
77
77
fn supports_color ( & self ) -> bool {
78
78
match self . current_buffer {
79
79
Some ( ref buffer) => buffer. supports_color ( ) ,
You can’t perform that action at this time.
0 commit comments