-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug-fix: Send safety for sync function #571
Conversation
} else { | ||
Err(err.into()) | ||
let delete_paths_stream = stream.try_filter_map(move |obj| { | ||
let key = key.to_string(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this ensures Send is satisfied due to &str
lifetimes
let s3 = s3.clone(); | ||
let src_bucket = src_bucket.to_string(); | ||
let src_prefix = src_prefix.to_string(); | ||
let dst_prefix = dst_prefix.to_string(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also satisfying Send trait
@@ -286,12 +287,12 @@ where | |||
{ | |||
input_stream.map(move |params| async move { | |||
let (source_path, metadata) = params?; | |||
let file_path: Box<dyn AsRef<Path>> = Box::new(source_path.clone()); | |||
let file_path: Box<dyn AsRef<Path> + Send + Sync> = Box::new(source_path.clone()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds +Send+Sync
to fix passing sync() to thread.
Adds send tests and attempts to fix some Send issues
Remaining issues:
1.