add Send + Sync on all traits, remove elsewhere

This commit is contained in:
Andre Bogus
2020-04-08 14:37:41 +02:00
parent 2a4e5f81de
commit 550413f00a
14 changed files with 36 additions and 39 deletions

View File

@@ -9,7 +9,7 @@ use tk::tokenizer::Result;
#[pyclass(dict)]
pub struct Decoder {
pub decoder: Container<dyn tk::tokenizer::Decoder + Sync>,
pub decoder: Container<dyn tk::tokenizer::Decoder>,
}
#[pymethods]
impl Decoder {

View File

@@ -78,7 +78,7 @@ impl<'source> FromPyObject<'source> for EncodeInput {
/// This class cannot be constructed directly. Please use one of the concrete models.
#[pyclass]
pub struct Model {
pub model: Container<dyn tk::tokenizer::Model + Sync>,
pub model: Container<dyn tk::tokenizer::Model>,
}
#[pymethods]

View File

@@ -7,7 +7,7 @@ use pyo3::types::*;
#[pyclass(dict)]
pub struct Normalizer {
pub normalizer: Container<dyn tk::tokenizer::Normalizer + Sync>,
pub normalizer: Container<dyn tk::tokenizer::Normalizer>,
}
#[pyclass(extends=Normalizer)]

View File

@@ -9,7 +9,7 @@ use tk::tokenizer::{Offsets, Result};
#[pyclass(dict)]
pub struct PreTokenizer {
pub pretok: Container<dyn tk::tokenizer::PreTokenizer + Sync>,
pub pretok: Container<dyn tk::tokenizer::PreTokenizer>,
}
#[pymethods]
impl PreTokenizer {

View File

@@ -6,7 +6,7 @@ use pyo3::types::*;
#[pyclass(dict)]
pub struct PostProcessor {
pub processor: Container<dyn tk::tokenizer::PostProcessor + Sync>,
pub processor: Container<dyn tk::tokenizer::PostProcessor>,
}
#[pymethods]