Add Send + Sync bounds
This commit is contained in:
parent
41efb3153d
commit
070c4a4d4a
|
@ -472,7 +472,8 @@ pub struct Form {
|
||||||
pub(crate) max_field_size: usize,
|
pub(crate) max_field_size: usize,
|
||||||
pub(crate) max_files: u32,
|
pub(crate) max_files: u32,
|
||||||
pub(crate) max_file_size: usize,
|
pub(crate) max_file_size: usize,
|
||||||
pub(crate) transform_error: Option<Arc<dyn Fn(crate::error::Error) -> actix_web::Error>>,
|
pub(crate) transform_error:
|
||||||
|
Option<Arc<dyn Fn(crate::error::Error) -> actix_web::Error + Send + Sync>>,
|
||||||
inner: Map,
|
inner: Map,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -500,7 +501,7 @@ impl Form {
|
||||||
/// Add an optional error handler to transform errors produced by the middleware
|
/// Add an optional error handler to transform errors produced by the middleware
|
||||||
pub fn transform_error(
|
pub fn transform_error(
|
||||||
mut self,
|
mut self,
|
||||||
f: impl Fn(crate::error::Error) -> actix_web::Error + 'static,
|
f: impl Fn(crate::error::Error) -> actix_web::Error + Send + Sync + 'static,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
self.transform_error = Some(Arc::new(f));
|
self.transform_error = Some(Arc::new(f));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue