Skip to content

Commit 1d5db1d

Browse files
authored
Merge pull request #241 from therealprof/branch/fix-some-clippy-lints
Fixed some trivial clippy lints
2 parents 8a929a5 + 6b62123 commit 1d5db1d

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
@@ -823,7 +823,7 @@ fn expand_svd_register(register: &Register, name: Option<&str>) -> Vec<syn::Fiel
823823
ident: Some(ident),
824824
vis: syn::Visibility::Public,
825825
attrs: vec![],
826-
ty: ty,
826+
ty,
827827
});
828828
}
829829
}
@@ -884,7 +884,7 @@ fn convert_svd_register(register: &Register, name: Option<&str>) -> syn::Field {
884884
ident: Some(ident),
885885
vis: syn::Visibility::Public,
886886
attrs: vec![],
887-
ty: ty,
887+
ty,
888888
}
889889
}
890890
}
@@ -947,7 +947,7 @@ fn expand_svd_cluster(cluster: &Cluster) -> Vec<syn::Field> {
947947
ident: Some(ident),
948948
vis: syn::Visibility::Public,
949949
attrs: vec![],
950-
ty: ty,
950+
ty,
951951
});
952952
}
953953
}
@@ -999,7 +999,7 @@ fn convert_svd_cluster(cluster: &Cluster) -> syn::Field {
999999
ident: Some(ident),
10001000
vis: syn::Visibility::Public,
10011001
attrs: vec![],
1002-
ty: ty,
1002+
ty,
10031003
}
10041004
}
10051005
}

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
Ok((
985985
evs,
986986
Some(Base {
987-
field: field,
987+
field,
988988
register: None,
989989
peripheral: None,
990990
}),

0 commit comments

Comments
 (0)