clippy::must_use_candidate

This commit is contained in:
gwenn
2022-01-05 19:40:31 +01:00
committed by Thom Chiovoloni
parent bcfe99578b
commit 406ac6a7fc
12 changed files with 36 additions and 0 deletions

View File

@@ -265,12 +265,14 @@ impl Blob<'_> {
/// Return the size in bytes of the BLOB.
#[inline]
#[must_use]
pub fn size(&self) -> i32 {
unsafe { ffi::sqlite3_blob_bytes(self.blob) }
}
/// Return the current size in bytes of the BLOB.
#[inline]
#[must_use]
pub fn len(&self) -> usize {
use std::convert::TryInto;
self.size().try_into().unwrap()
@@ -278,6 +280,7 @@ impl Blob<'_> {
/// Return true if the BLOB is empty.
#[inline]
#[must_use]
pub fn is_empty(&self) -> bool {
self.size() == 0
}