From 9c68e080d6f78ab4bec47fecd37e5616b19d1ec6 Mon Sep 17 00:00:00 2001 From: Graham Esau Date: Mon, 5 Apr 2021 20:47:03 +0100 Subject: [PATCH] Remove extraneous "and" from tuple schema names --- schemars/src/json_schema_impls/tuple.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/schemars/src/json_schema_impls/tuple.rs b/schemars/src/json_schema_impls/tuple.rs index d9e8971..383f839 100644 --- a/schemars/src/json_schema_impls/tuple.rs +++ b/schemars/src/json_schema_impls/tuple.rs @@ -9,7 +9,9 @@ macro_rules! tuple_impls { no_ref_schema!(); fn schema_name() -> String { - ["Tuple_of".to_owned()$(, $name::schema_name())+].join("_and_") + let mut name = "Tuple_of_".to_owned(); + name.push_str(&[$($name::schema_name()),+].join("_and_")); + name } fn json_schema(gen: &mut SchemaGenerator) -> Schema {