Skip to content
Permalink
Browse files

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
1 parent 99cd7ba commit 8757cf5bc084ee23db643e283ca7e9fef143d810
Showing with 1 addition and 1 deletion.
  1. +1 −1 components/canvas_traits/webgl.rs
@@ -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 {

0 comments on commit 8757cf5

Please sign in to comment.
You can’t perform that action at this time.