mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-22 15:39:28 +08:00
clippy::unseparated_literal_suffix
This commit is contained in:
parent
c10e2f39ef
commit
e1fd731cb0
@ -19,7 +19,7 @@ pub fn SQLITE_STATIC() -> sqlite3_destructor_type {
|
||||
|
||||
#[must_use]
|
||||
pub fn SQLITE_TRANSIENT() -> sqlite3_destructor_type {
|
||||
Some(unsafe { mem::transmute(-1isize) })
|
||||
Some(unsafe { mem::transmute(-1_isize) })
|
||||
}
|
||||
|
||||
/// Run-Time Limit Categories
|
||||
|
@ -107,7 +107,7 @@ impl Connection {
|
||||
let restore = Backup::new_with_names(&src, DatabaseName::Main, self, name)?;
|
||||
|
||||
let mut r = More;
|
||||
let mut busy_count = 0i32;
|
||||
let mut busy_count = 0_i32;
|
||||
'restore_loop: while r == More || r == Busy {
|
||||
r = restore.step(100)?;
|
||||
if let Some(ref f) = progress {
|
||||
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ pub(crate) struct SmallCString(smallvec::SmallVec<[u8; 16]>);
|
||||
impl SmallCString {
|
||||
#[inline]
|
||||
pub fn new(s: &str) -> Result<Self, NulError> {
|
||||
if s.as_bytes().contains(&0u8) {
|
||||
if s.as_bytes().contains(&0_u8) {
|
||||
return Err(Self::fabricate_nul_error(s));
|
||||
}
|
||||
let mut buf = SmallVec::with_capacity(s.len() + 1);
|
||||
|
@ -106,11 +106,11 @@ unsafe impl<'vtab> VTab<'vtab> for ArrayTab {
|
||||
}
|
||||
}
|
||||
if ptr_idx {
|
||||
info.set_estimated_cost(1f64);
|
||||
info.set_estimated_cost(1_f64);
|
||||
info.set_estimated_rows(100);
|
||||
info.set_idx_num(1);
|
||||
} else {
|
||||
info.set_estimated_cost(2_147_483_647f64);
|
||||
info.set_estimated_cost(2_147_483_647_f64);
|
||||
info.set_estimated_rows(2_147_483_647);
|
||||
info.set_idx_num(0);
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ union ModuleZeroHack {
|
||||
// structs are allowed to be zeroed.
|
||||
const ZERO_MODULE: ffi::sqlite3_module = unsafe {
|
||||
ModuleZeroHack {
|
||||
bytes: [0u8; std::mem::size_of::<ffi::sqlite3_module>()],
|
||||
bytes: [0_u8; std::mem::size_of::<ffi::sqlite3_module>()],
|
||||
}
|
||||
.module
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user