From 1685c4b842fe1373cd729e523a156b7c1ac861a1 Mon Sep 17 00:00:00 2001 From: David M <PieKing1215@users.noreply.github.com> Date: Sun, 26 Dec 2021 16:04:40 -0500 Subject: [PATCH] Remove unnecessary ::<u32> on layer id parse() --- src/layers.rs | 2 +- src/objects.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layers.rs b/src/layers.rs index 2b2a6c3..955c715 100644 --- a/src/layers.rs +++ b/src/layers.rs @@ -75,7 +75,7 @@ impl Layer { ], required: [ ("name", name, |v| Some(v)), - ("id", id, |v:String| v.parse::<u32>().ok()), + ("id", id, |v:String| v.parse().ok()), ], TiledError::MalformedAttributes("layer must have a name".to_string()) ); diff --git a/src/objects.rs b/src/objects.rs index 36dcd6a..0521923 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -38,7 +38,7 @@ impl ObjectGroup { ("name", name, |v:String| v.into()), ], required: [ - ("id", id, |v:String| v.parse::<u32>().ok()), + ("id", id, |v:String| v.parse().ok()), ], TiledError::MalformedAttributes("object groups must have a name".to_string()) ); -- GitLab