clippy::unseparated_literal_suffix

This commit is contained in:
gwenn
2022-01-05 20:03:30 +01:00
committed by Thom Chiovoloni
parent c10e2f39ef
commit e1fd731cb0
7 changed files with 8 additions and 8 deletions

View File

@@ -198,7 +198,7 @@ impl FromSql for i128 {
#[inline]
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self> {
let bytes = <[u8; 16]>::column_result(value)?;
Ok(i128::from_be_bytes(bytes) ^ (1i128 << 127))
Ok(i128::from_be_bytes(bytes) ^ (1_i128 << 127))
}
}

View File

@@ -47,7 +47,7 @@ impl From<i128> for Value {
fn from(i: i128) -> Value {
// We store these biased (e.g. with the most significant bit flipped)
// so that comparisons with negative numbers work properly.
Value::Blob(i128::to_be_bytes(i ^ (1i128 << 127)).to_vec())
Value::Blob(i128::to_be_bytes(i ^ (1_i128 << 127)).to_vec())
}
}