mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-16 16:29:30 +01:00
Explicitly specify Send requirement where dyn traits are used (#296)
This commit is contained in:
@@ -738,9 +738,9 @@ else {
|
||||
mp_reader.add_part(&mut request_value_reader, request_size, json_mime_type.clone())
|
||||
.add_part(&mut reader, size, reader_mime_type.clone());
|
||||
let mime_type = mp_reader.mime_type();
|
||||
(&mut mp_reader as &mut dyn io::Read, (CONTENT_TYPE, mime_type.to_string()))
|
||||
(&mut mp_reader as &mut (dyn io::Read + Send), (CONTENT_TYPE, mime_type.to_string()))
|
||||
},
|
||||
_ => (&mut request_value_reader as &mut dyn io::Read, (CONTENT_TYPE, json_mime_type.to_string())),
|
||||
_ => (&mut request_value_reader as &mut (dyn io::Read + Send), (CONTENT_TYPE, json_mime_type.to_string())),
|
||||
};
|
||||
% endif
|
||||
let client = &self.hub.client;
|
||||
|
||||
@@ -360,8 +360,8 @@ const BOUNDARY: &str = "MDuXWGyeE33QFXGchb2VFWc4Z7945d";
|
||||
/// to google APIs, and might not be a fully-featured implementation.
|
||||
#[derive(Default)]
|
||||
pub struct MultiPartReader<'a> {
|
||||
raw_parts: Vec<(HeaderMap, &'a mut dyn Read)>,
|
||||
current_part: Option<(Cursor<Vec<u8>>, &'a mut dyn Read)>,
|
||||
raw_parts: Vec<(HeaderMap, &'a mut (dyn Read + Send))>,
|
||||
current_part: Option<(Cursor<Vec<u8>>, &'a mut (dyn Read + Send))>,
|
||||
last_part_boundary: Option<Cursor<Vec<u8>>>,
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ impl<'a> MultiPartReader<'a> {
|
||||
/// `mime` - It will be put onto the content type
|
||||
pub fn add_part(
|
||||
&mut self,
|
||||
reader: &'a mut dyn Read,
|
||||
reader: &'a mut (dyn Read + Send),
|
||||
size: u64,
|
||||
mime_type: Mime,
|
||||
) -> &mut MultiPartReader<'a> {
|
||||
|
||||
Reference in New Issue
Block a user