We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5faf18d commit aaf14f3Copy full SHA for aaf14f3
rust-runtime/aws-smithy-types/src/lib.rs
@@ -291,7 +291,7 @@ impl TryFrom<Number> for f64 {
291
}
292
293
Number::NegInt(v) => {
294
- if -(1 << 53) <= v && v <= (1 << 53) {
+ if (-(1 << 53)..=(1 << 53)).contains(&v) {
295
Ok(v as Self)
296
} else {
297
Err(Self::Error::I64ToFloatLossyConversion(v))
@@ -316,7 +316,7 @@ impl TryFrom<Number> for f32 {
316
317
318
319
- if -(1 << 24) <= v && v <= (1 << 24) {
+ if (-(1 << 24)..=(1 << 24)).contains(&v) {
320
321
322
0 commit comments