Skip allocations
This commit is contained in:
parent
2cbb249c46
commit
782da35a7b
3 changed files with 4 additions and 1 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -1657,6 +1657,7 @@ dependencies = [
|
|||
"simplelog",
|
||||
"sqlx",
|
||||
"thiserror",
|
||||
"tinyvec",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"toml 0.8.19",
|
||||
|
|
|
@ -37,6 +37,7 @@ serde = { version = "1.0.147", features = ["derive"] }
|
|||
serde_derive = "1.0.147"
|
||||
serde_json = "1.0.122"
|
||||
simplelog = "0.12.2"
|
||||
tinyvec = "1.8.0"
|
||||
thiserror = "1.0.62"
|
||||
tokio = { version = "1.39", features = ["macros", "rt-multi-thread"] }
|
||||
tokio-util = { version = "0.7.11", features = ["io"] }
|
||||
|
|
|
@ -7,6 +7,7 @@ use std::{
|
|||
|
||||
use lasso2::ThreadedRodeo;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tinyvec::TinyVec;
|
||||
use trie_rs::{Trie, TrieBuilder};
|
||||
|
||||
use crate::app::index::{InternPath, PathID};
|
||||
|
@ -139,7 +140,7 @@ impl Builder {
|
|||
song.virtual_path
|
||||
.components()
|
||||
.map(|c| strings.get_or_intern(c.as_os_str().to_str().unwrap()))
|
||||
.collect::<Vec<_>>(),
|
||||
.collect::<TinyVec<[lasso2::Spur; 8]>>(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue