Removed Any bound from Visitor (#41)
This commit is contained in:
parent
4197bf4183
commit
5b316fb31b
2 changed files with 3 additions and 3 deletions
|
@ -101,7 +101,7 @@ impl SchemaSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TODO document
|
/// 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.visitors.0.push(Arc::new(visitor));
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::schema::{RootSchema, Schema, SchemaObject, SingleOrVec};
|
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) {
|
fn visit_root_schema(&self, root: &mut RootSchema) {
|
||||||
visit_root_schema(self, root)
|
visit_root_schema(self, root)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue