perf: switch from String
to SmartString
This commit is contained in:
parent
1ba0e8b5ba
commit
46f09ea70e
3 changed files with 8 additions and 0 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1532,6 +1532,7 @@ dependencies = [
|
|||
"serde",
|
||||
"serde_json",
|
||||
"slotmap",
|
||||
"smartstring",
|
||||
"tempfile",
|
||||
"thiserror 2.0.9",
|
||||
"tokio",
|
||||
|
@ -2388,6 +2389,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"serde",
|
||||
"static_assertions",
|
||||
"version_check",
|
||||
]
|
||||
|
|
|
@ -52,6 +52,8 @@ log = "~0.4"
|
|||
parking_lot = "0.12.3"
|
||||
thiserror.workspace = true
|
||||
|
||||
smartstring = { version = "1.0.1", features = ["serde"]}
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
clipboard-win = { version = "5.4", features = ["std"] }
|
||||
|
||||
|
|
|
@ -2,6 +2,10 @@ use std::collections::HashMap;
|
|||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use smartstring::{LazyCompact, SmartString};
|
||||
|
||||
type String = SmartString<LazyCompact>;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default, PartialEq, Eq, Clone)]
|
||||
#[serde(default)]
|
||||
pub struct Icons {
|
||||
|
|
Loading…
Reference in a new issue