mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-03 17:48:17 +00:00
increasing string capacity to reduce allocations
This commit is contained in:
parent
90ecaf40b5
commit
b678375c69
1 changed files with 1 additions and 1 deletions
|
@ -685,7 +685,7 @@ pub fn json_quote(value: &OwnedValue) -> crate::Result<OwnedValue> {
|
|||
return Ok(value.to_owned());
|
||||
}
|
||||
|
||||
let mut escaped_value = String::with_capacity(t.value.len());
|
||||
let mut escaped_value = String::with_capacity(t.value.len() + 4);
|
||||
escaped_value.push('"');
|
||||
for c in t.value.to_string_lossy().chars() {
|
||||
match c {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue