Merge branch 'upstream/unstable' into capella

This commit is contained in:
Mark Mackey
2023-01-31 12:16:26 -06:00
11 changed files with 33 additions and 28 deletions

View File

@@ -115,11 +115,7 @@ impl Comparison {
let mut children = vec![];
for i in 0..std::cmp::max(a.len(), b.len()) {
children.push(FieldComparison::new(
format!("{:}", i),
&a.get(i),
&b.get(i),
));
children.push(FieldComparison::new(format!("{i}"), &a.get(i), &b.get(i)));
}
Self::parent(field_name, a == b, children)
@@ -164,8 +160,8 @@ impl FieldComparison {
Self {
field_name,
equal: a == b,
a: format!("{:?}", a),
b: format!("{:?}", b),
a: format!("{a:?}"),
b: format!("{b:?}"),
}
}

View File

@@ -32,7 +32,7 @@ pub fn compare_fields_derive(input: TokenStream) -> TokenStream {
_ => panic!("compare_fields_derive only supports named struct fields."),
};
let field_name = format!("{:}", ident_a);
let field_name = ident_a.to_string();
let ident_b = ident_a.clone();
let quote = if is_slice(field) {