Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide workaround for lifetime bug in rustlang
Due to rust-lang/rust#22252, r-value temporaries outlive the lifetimes of variables bound with let statements in a function body. Because of this, device.rs fails to compile against newer rustc nightlies. This implements a simple workaround that binds the result of the match in `request_code` to a local variable before returning it. This allows it to have the same lifetime as `req` in one of the previous let bindings.
- Loading branch information