From 216422dffcc7736548d37e3449ef76da1431aa6d Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 23 Apr 2024 12:40:26 +1000 Subject: [PATCH] Remove schemars impl for test type We do not test the schemars stuff in `hashes`, instead we do it in a separate crate `extended_tests/schemars`. There is therefore no reason to implement `schemars::JsonSchema` for the `TestHashTag`. --- hashes/src/sha256t.rs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/hashes/src/sha256t.rs b/hashes/src/sha256t.rs index 1a613cd39..abb8162ab 100644 --- a/hashes/src/sha256t.rs +++ b/hashes/src/sha256t.rs @@ -185,21 +185,6 @@ mod tests { } } - #[cfg(feature = "schemars")] - impl schemars::JsonSchema for TestHashTag { - fn schema_name() -> String { "Hash".to_owned() } - - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { - let mut schema: schemars::schema::SchemaObject = ::json_schema(gen).into(); - schema.string = Some(Box::new(schemars::schema::StringValidation { - max_length: Some(64 * 2), - min_length: Some(64 * 2), - pattern: Some("[0-9a-fA-F]+".to_owned()), - })); - schema.into() - } - } - /// A hash tagged with `$name`. #[cfg(feature = "alloc")] pub type TestHash = sha256t::Hash;