Skip to content

Commit 16a3a4a

Browse files
committed
fic clippy
1 parent dee74ac commit 16a3a4a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crates/common_types/src/primitive_wrappers.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,9 @@ mod u32_wrappers {
200200
{
201201
let val = i32::deserialize(deserializer)?;
202202
if val < 0 {
203-
Err("DisputePollingIntervalInHours cannot be negative").map_err(D::Error::custom)?
203+
Err(D::Error::custom("DisputePollingIntervalInHours cannot be negative"))
204204
} else if val > MAX_DISPUTE_POLLING_INTERVAL_IN_HOURS {
205-
Err("DisputePollingIntervalInHours exceeds the maximum allowed value of 24")
206-
.map_err(D::Error::custom)?
205+
Err(D::Error::custom("DisputePollingIntervalInHours exceeds the maximum allowed value of 24"))
207206
} else {
208207
Ok(Self(val))
209208
}

0 commit comments

Comments
 (0)