Misc code cleanups accumulated while working on other changes (#34787)

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-07-20 17:22:13 -06:00 committed by GitHub
parent 7c1040bc93
commit 137081f050
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 9 additions and 21 deletions

View file

@ -15,7 +15,6 @@ pub fn replace_subschema<T: JsonSchema>(
generator: &mut schemars::SchemaGenerator,
schema: impl Fn() -> schemars::Schema,
) -> schemars::Schema {
// fallback on just using the schema name, which could collide.
let schema_name = T::schema_name();
let definitions = generator.definitions_mut();
assert!(!definitions.contains_key(&format!("{schema_name}2")));