Skip to content
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

Switch some crates to the 2018 edition #22086

Merged
merged 8 commits into from Nov 6, 2018
Prev

Use question mark operator instead of `try` macro with a raw identifier

Co-Authored-By: SimonSapin <simon.sapin@exyr.org>
  • Loading branch information
KiChjang and SimonSapin committed Nov 6, 2018
commit 8757cf5bc084ee23db643e283ca7e9fef143d810
@@ -342,7 +342,7 @@ macro_rules! define_resource_id {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: ::serde::Deserializer<'de>
{
let id = r#try!(u32::deserialize(deserializer));
let id = u32::deserialize(deserializer)?;
if id == 0 {
Err(::serde::de::Error::custom("expected a non-zero value"))
} else {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.