Skip to content

Commit cbe072f

Browse files
committed
add comments
1 parent d97ab68 commit cbe072f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sqlx-core/src/mssql/types/decimal_tools.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::error::BoxDynError;
22

3+
/// Returns value*10000
34
pub(crate) fn decode_money_bytes(bytes: &[u8]) -> Result<i64, BoxDynError> {
45
if bytes.len() != 8 && bytes.len() != 4 {
56
return Err(err_protocol!("expected 8/4 bytes for Money, got {}", bytes.len()).into());
@@ -14,7 +15,7 @@ pub(crate) fn decode_money_bytes(bytes: &[u8]) -> Result<i64, BoxDynError> {
1415
Ok(amount)
1516
}
1617

17-
/// Returns
18+
/// Returns (sign, denominator)
1819
pub(crate) fn decode_numeric_bytes(bytes: &[u8]) -> Result<(i8, u128), BoxDynError> {
1920
if bytes.is_empty() {
2021
return Err(err_protocol!("numeric bytes cannot be empty").into());

0 commit comments

Comments
 (0)