mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 01:58:16 +00:00
corrected to use newly created as_str function to convert to string slice
This commit is contained in:
parent
8fe71309c0
commit
c3cad5dfdd
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,6 @@ pub use crate::json::ser::to_string;
|
|||
use crate::types::{OwnedValue, Text, TextSubtype};
|
||||
use indexmap::IndexMap;
|
||||
use jsonb::Error as JsonbError;
|
||||
use rustix::path::Arg;
|
||||
use ser::to_string_pretty;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
@ -687,7 +686,8 @@ pub fn json_quote(value: &OwnedValue) -> crate::Result<OwnedValue> {
|
|||
|
||||
let mut escaped_value = String::with_capacity(t.value.len() + 4);
|
||||
escaped_value.push('"');
|
||||
for c in t.value.to_string_lossy().chars() {
|
||||
|
||||
for c in t.as_str().chars() {
|
||||
match c {
|
||||
'"' | '\\' | '\n' | '\r' | '\t' | '\u{0008}' | '\u{000c}' => {
|
||||
escaped_value.push('\\');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue