Merge pull request #1034 from gwenn/2021_edition

Migrate to 2021 edition
This commit is contained in:
gwenn 2021-10-21 20:20:01 +02:00 committed by GitHub
commit c2d595aa11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
name = "rusqlite" name = "rusqlite"
version = "0.26.1" version = "0.26.1"
authors = ["The rusqlite developers"] authors = ["The rusqlite developers"]
edition = "2018" edition = "2021"
description = "Ergonomic wrapper for SQLite" description = "Ergonomic wrapper for SQLite"
repository = "https://github.com/rusqlite/rusqlite" repository = "https://github.com/rusqlite/rusqlite"
documentation = "http://docs.rs/rusqlite/" documentation = "http://docs.rs/rusqlite/"

View File

@ -272,7 +272,6 @@ impl Blob<'_> {
/// Return the current size in bytes of the BLOB. /// Return the current size in bytes of the BLOB.
#[inline] #[inline]
pub fn len(&self) -> usize { pub fn len(&self) -> usize {
use std::convert::TryInto;
self.size().try_into().unwrap() self.size().try_into().unwrap()
} }

View File

@ -103,7 +103,6 @@ impl SqliteMallocString {
/// This means it's safe to use in extern "C" functions even outside of /// This means it's safe to use in extern "C" functions even outside of
/// catch_unwind. /// catch_unwind.
pub(crate) fn from_str(s: &str) -> Self { pub(crate) fn from_str(s: &str) -> Self {
use std::convert::TryFrom;
let s = if s.as_bytes().contains(&0) { let s = if s.as_bytes().contains(&0) {
std::borrow::Cow::Owned(make_nonnull(s)) std::borrow::Cow::Owned(make_nonnull(s))
} else { } else {

View File

@ -520,6 +520,8 @@ impl OrderBy<'_> {
/// Virtual table cursor trait. /// Virtual table cursor trait.
/// ///
/// # Safety
///
/// Implementations must be like: /// Implementations must be like:
/// ```rust,ignore /// ```rust,ignore
/// #[repr(C)] /// #[repr(C)]