mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-07 03:56:42 +01:00
Don't re-borrow a refcell while it is still in use (#269)
Despite multiple attempts on reusing the RefMut we get from the first borrow as stored in `authenticator`, using it in the needed spot seemed impossible despite the compiler trying to make suggestions. Dropping `authenticator` and reborrowing is done for that reason, fair enough.
This commit is contained in:
@@ -841,11 +841,12 @@ else {
|
||||
dlg.store_upload_url(Some(url_str));
|
||||
}
|
||||
|
||||
drop(authenticator);
|
||||
client::ResumableUploadHelper {
|
||||
client: &mut client.borrow_mut(),
|
||||
delegate: dlg,
|
||||
start_at: if upload_url_from_server { Some(0) } else { None },
|
||||
auth: &mut *self.hub.auth.borrow_mut(),
|
||||
auth: &mut *${auth_call},
|
||||
user_agent: &self.hub._user_agent,
|
||||
auth_header: format!("Bearer {}", token.as_str()),
|
||||
url: url_str,
|
||||
|
||||
Reference in New Issue
Block a user