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 512d5ae commit 88e20d3Copy full SHA for 88e20d3
build.rs
@@ -394,10 +394,7 @@ mod binary {
394
if num % 0x1000 == 0 {
395
Ok(AlignedAddress(num))
396
} else {
397
- Err(serde::de::Error::invalid_value(
398
- serde::de::Unexpected::Unsigned(num),
399
- &self,
400
- ))
+ Err(serde::de::Error::custom(format!("address {:#x} is not page aligned", num)))
401
}
402
403
@@ -411,7 +408,7 @@ mod binary {
411
408
u64::from_str_radix(&value, 10)
412
409
413
410
.map_err(|_err| {
414
- serde::de::Error::invalid_value(serde::de::Unexpected::Str(value), &self)
+ serde::de::Error::custom(format!("string \"{}\" is not a valid memory address", value))
415
})?;
416
417
self.visit_u64(num)
0 commit comments