Skip to content

Commit 9eaedbb

Browse files
committed
refactor: use more descriptive variable names
1 parent 1ce7e47 commit 9eaedbb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

kube-core/src/schema/transform_any_of.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ pub(crate) fn hoist_any_of_subschema_with_a_nullable_variant(kube_schema: &mut S
3838

3939
let entry_is_null: [bool; 2] = any_of
4040
.iter()
41-
.map(|x| serde_json::to_value(x).expect("schema should be able to convert to JSON"))
42-
.map(|x| x == *NULL_SCHEMA)
41+
.map(|schema| serde_json::to_value(schema).expect("schema should be able to convert to JSON"))
42+
.map(|value| value == *NULL_SCHEMA)
4343
.collect::<Vec<_>>()
4444
.try_into()
4545
.expect("there should be exactly 2 elements. We checked earlier");

kube-core/src/schema/transform_properties.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ pub(crate) fn hoist_properties_for_any_of_subschemas(kube_schema: &mut SchemaObj
4040
// Return if there is a null entry
4141
if subschemas
4242
.iter()
43-
.map(|x| serde_json::to_value(x).expect("schema should be able to convert to JSON"))
44-
.any(|x| x == *NULL_SCHEMA)
43+
.map(|schema| serde_json::to_value(schema).expect("schema should be able to convert to JSON"))
44+
.any(|value| value == *NULL_SCHEMA)
4545
{
4646
return;
4747
}

0 commit comments

Comments
 (0)