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 dee74ac commit 16a3a4aCopy full SHA for 16a3a4a
crates/common_types/src/primitive_wrappers.rs
@@ -200,10 +200,9 @@ mod u32_wrappers {
200
{
201
let val = i32::deserialize(deserializer)?;
202
if val < 0 {
203
- Err("DisputePollingIntervalInHours cannot be negative").map_err(D::Error::custom)?
+ Err(D::Error::custom("DisputePollingIntervalInHours cannot be negative"))
204
} 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)?
+ Err(D::Error::custom("DisputePollingIntervalInHours exceeds the maximum allowed value of 24"))
207
} else {
208
Ok(Self(val))
209
}
0 commit comments