From 2d9b902d2e0851c825744a9592cc5cca1ebae8e3 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 31 Aug 2017 14:35:19 -0700 Subject: [PATCH] Clean up a redundant cast. --- lib/cretonne/src/ir/immediates.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cretonne/src/ir/immediates.rs b/lib/cretonne/src/ir/immediates.rs index 2ab486f864..f33e13eccf 100644 --- a/lib/cretonne/src/ir/immediates.rs +++ b/lib/cretonne/src/ir/immediates.rs @@ -259,7 +259,7 @@ impl FromStr for Offset32 { if !(s.starts_with('-') || s.starts_with('+')) { return Err("Offset must begin with sign"); } - parse_i64(s).and_then(|x| if i64::from(i32::MIN) as i64 <= x && + parse_i64(s).and_then(|x| if i64::from(i32::MIN) <= x && x <= i64::from(i32::MAX) { Ok(Offset32::new(x as i32))