Match error message in Amount::Read_i64() to allow_negative value
This commit is contained in:
@@ -37,7 +37,11 @@ impl Amount {
|
|||||||
} else {
|
} else {
|
||||||
Err(io::Error::new(
|
Err(io::Error::new(
|
||||||
io::ErrorKind::InvalidData,
|
io::ErrorKind::InvalidData,
|
||||||
"Amount not in {0..MAX_MONEY}",
|
if allow_negative {
|
||||||
|
"Amount not in {-MAX_MONEY..MAX_MONEY}"
|
||||||
|
} else {
|
||||||
|
"Amount not in {0..MAX_MONEY}"
|
||||||
|
},
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user