Skip to content

Commit 6b62123

Browse files
committed
Fixed some trivial clippy lints
Signed-off-by: Daniel Egger <[email protected]>
1 parent 77ce4d5 commit 6b62123

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

src/generate/peripheral.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ fn expand_svd_register(register: &Register, name: Option<&str>) -> Vec<syn::Fiel
824824
ident: Some(ident),
825825
vis: syn::Visibility::Public,
826826
attrs: vec![],
827-
ty: ty,
827+
ty,
828828
});
829829
}
830830
}
@@ -885,7 +885,7 @@ fn convert_svd_register(register: &Register, name: Option<&str>) -> syn::Field {
885885
ident: Some(ident),
886886
vis: syn::Visibility::Public,
887887
attrs: vec![],
888-
ty: ty,
888+
ty,
889889
}
890890
}
891891
}
@@ -948,7 +948,7 @@ fn expand_svd_cluster(cluster: &Cluster) -> Vec<syn::Field> {
948948
ident: Some(ident),
949949
vis: syn::Visibility::Public,
950950
attrs: vec![],
951-
ty: ty,
951+
ty,
952952
});
953953
}
954954
}
@@ -1000,7 +1000,7 @@ fn convert_svd_cluster(cluster: &Cluster) -> syn::Field {
10001000
ident: Some(ident),
10011001
vis: syn::Visibility::Public,
10021002
attrs: vec![],
1003-
ty: ty,
1003+
ty,
10041004
}
10051005
}
10061006
}

src/generate/register.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,13 @@ pub fn fields(
252252
description.push_str(&*util::respace(d));
253253
}
254254
Ok(F {
255-
_pc_w: _pc_w,
256-
_sc: _sc,
257-
description: description,
258-
pc_r: pc_r,
259-
pc_w: pc_w,
260-
bits: bits,
261-
width: width,
255+
_pc_w,
256+
_sc,
257+
description,
258+
pc_r,
259+
pc_w,
260+
bits,
261+
width,
262262
access: f.access,
263263
evs: &f.enumerated_values,
264264
sc: Ident::new(&*sc),
@@ -331,11 +331,11 @@ pub fn fields(
331331
ev.name)
332332
})?);
333333
Ok(Variant {
334-
description: description,
335-
sc: sc,
334+
description,
335+
sc,
336336
pc: Ident::new(&*ev.name
337337
.to_sanitized_upper_case()),
338-
value: value,
338+
value,
339339
})
340340
})
341341
.collect::<Result<Vec<_>>>()?;
@@ -670,7 +670,7 @@ pub fn fields(
670670
.to_sanitized_upper_case()),
671671
sc: Ident::new(&*ev.name
672672
.to_sanitized_snake_case()),
673-
value: value,
673+
value,
674674
})
675675
},
676676
)
@@ -984,7 +984,7 @@ fn lookup_in_register<'r>(
984984
return Ok((
985985
evs,
986986
Some(Base {
987-
field: field,
987+
field,
988988
register: None,
989989
peripheral: None,
990990
}),

0 commit comments

Comments
 (0)