sim: Simplify some struct initializers
In rust, if a struct field is initialized with a variable with the same
name as the field, it is redundant to say `field: field` as the
initializer, and just `field` is sufficient. Fix the instances of this
that clippy suggests.
Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/sim/src/depends.rs b/sim/src/depends.rs
index f3bbc29..a67bcd8 100644
--- a/sim/src/depends.rs
+++ b/sim/src/depends.rs
@@ -30,7 +30,7 @@
impl BoringDep {
pub fn new(number: usize, test: &DepTest) -> BoringDep {
BoringDep {
- number: number,
+ number,
test: test.clone(),
}
}
@@ -179,7 +179,7 @@
fn new_synthetic(image_id: u8, slot: u8, minor: u8) -> ImageVersion {
ImageVersion {
major: image_id * 20 + slot,
- minor: minor,
+ minor,
revision: 1,
build_num: slot as u32,
}