Skip to content

Commit 966822c

Browse files
committed
fix: Serialize the full u64 range
This looks like something that was missed during #178.
1 parent 6db5c1d commit 966822c

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/ser.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,7 @@ impl<'a> ser::Serializer for &'a mut ConfigSerializer {
121121
}
122122

123123
fn serialize_u64(self, v: u64) -> Result<Self::Ok> {
124-
if v > (i64::MAX as u64) {
125-
Err(ConfigError::Message(format!(
126-
"value {} is greater than the max {}",
127-
v,
128-
i64::MAX
129-
)))
130-
} else {
131-
self.serialize_i64(v as i64)
132-
}
124+
self.serialize_primitive(v)
133125
}
134126

135127
fn serialize_f32(self, v: f32) -> Result<Self::Ok> {

0 commit comments

Comments
 (0)