Skip to content

Commit

Permalink
Use question mark operator instead of try macro with a raw identifier
Browse files Browse the repository at this point in the history
Co-Authored-By: SimonSapin <simon.sapin@exyr.org>
  • Loading branch information
KiChjang and SimonSapin committed Nov 6, 2018
1 parent 99cd7ba commit 8757cf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/canvas_traits/webgl.rs
Expand Up @@ -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 {
Expand Down

0 comments on commit 8757cf5

Please sign in to comment.