Undo transition to edition 2021, prep release 0.26.3

This commit is contained in:
Thom Chiovoloni
2021-12-08 16:54:38 -08:00
parent 03dbb7821c
commit 287b0ea08b
3 changed files with 4 additions and 2 deletions

View File

@@ -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 {