From ade95a54d5b6678550759c6a34dad9d9148582fa Mon Sep 17 00:00:00 2001 From: Graham Esau Date: Sun, 4 Aug 2024 16:45:39 +0100 Subject: [PATCH] Remove default implementation of `Visitor::visit_schema()` Since it's now the only method, there's no good reason to implement the trait without implementing that method. --- schemars/src/visit.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/schemars/src/visit.rs b/schemars/src/visit.rs index 850c1eb..35453e0 100644 --- a/schemars/src/visit.rs +++ b/schemars/src/visit.rs @@ -36,9 +36,7 @@ pub trait Visitor { /// Override this method to modify a [`Schema`] and (optionally) its subschemas. /// /// When overriding this method, you will usually want to call the [`visit_schema`] function to visit subschemas. - fn visit_schema(&mut self, schema: &mut Schema) { - visit_schema(self, schema) - } + fn visit_schema(&mut self, schema: &mut Schema); } /// Visits all subschemas of the [`Schema`].