Removed Any bound from Visitor (#41)

This commit is contained in:
Ferenc Tamás 2020-06-06 00:45:17 +02:00 committed by GitHub
parent 4197bf4183
commit 5b316fb31b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -101,7 +101,7 @@ impl SchemaSettings {
}
/// TODO document
pub fn with_visitor(mut self, visitor: impl Visitor) -> Self {
pub fn with_visitor(mut self, visitor: impl Visitor + 'static) -> Self {
self.visitors.0.push(Arc::new(visitor));
self
}

View file

@ -1,7 +1,7 @@
use crate::schema::{RootSchema, Schema, SchemaObject, SingleOrVec};
use std::{any::Any, fmt::Debug};
use std::fmt::Debug;
pub trait Visitor: Debug + Any {
pub trait Visitor: Debug {
fn visit_root_schema(&self, root: &mut RootSchema) {
visit_root_schema(self, root)
}