mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2026-01-08 12:06:59 +01:00
Merge pull request #9 from worr/bug/rvalue-lifetime-build-failures
MERGE: fix(rustup) workaround rust bug
This commit is contained in:
@@ -192,7 +192,9 @@ impl<C> DeviceFlow<C>
|
||||
.collect::<String>()
|
||||
.as_ref())]);
|
||||
|
||||
match self.client.borrow_mut().post(FlowType::Device.as_ref())
|
||||
// note: works around bug in rustlang
|
||||
// https://github.com/rust-lang/rust/issues/22252
|
||||
let ret = match self.client.borrow_mut().post(FlowType::Device.as_ref())
|
||||
.header(ContentType("application/x-www-form-urlencoded".parse().unwrap()))
|
||||
.body(&*req)
|
||||
.send() {
|
||||
@@ -237,7 +239,9 @@ impl<C> DeviceFlow<C>
|
||||
self.id = client_id.to_string();
|
||||
Ok(pi)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ret
|
||||
}
|
||||
|
||||
/// If the first call is successful, this method may be called.
|
||||
@@ -394,4 +398,4 @@ pub mod tests {
|
||||
// As our mock has only 3 items, we would panic on this call
|
||||
assert_eq!(flow.poll_token().unwrap(), Some(t));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user