mirror of
https://github.com/isar/rusqlite.git
synced 2025-10-30 21:38:57 +08:00
Undo transition to edition 2021, prep release 0.26.3
This commit is contained in:
@@ -272,6 +272,7 @@ impl Blob<'_> {
|
||||
/// Return the current size in bytes of the BLOB.
|
||||
#[inline]
|
||||
pub fn len(&self) -> usize {
|
||||
use std::convert::TryInto;
|
||||
self.size().try_into().unwrap()
|
||||
}
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@ impl SqliteMallocString {
|
||||
/// This means it's safe to use in extern "C" functions even outside of
|
||||
/// catch_unwind.
|
||||
pub(crate) fn from_str(s: &str) -> Self {
|
||||
use std::convert::TryFrom;
|
||||
let s = if s.as_bytes().contains(&0) {
|
||||
std::borrow::Cow::Owned(make_nonnull(s))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user