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",
|
"simplelog",
|
||||||
"sqlx",
|
"sqlx",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
|
"tinyvec",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
"toml 0.8.19",
|
"toml 0.8.19",
|
||||||
|
|
|
@ -37,6 +37,7 @@ serde = { version = "1.0.147", features = ["derive"] }
|
||||||
serde_derive = "1.0.147"
|
serde_derive = "1.0.147"
|
||||||
serde_json = "1.0.122"
|
serde_json = "1.0.122"
|
||||||
simplelog = "0.12.2"
|
simplelog = "0.12.2"
|
||||||
|
tinyvec = "1.8.0"
|
||||||
thiserror = "1.0.62"
|
thiserror = "1.0.62"
|
||||||
tokio = { version = "1.39", features = ["macros", "rt-multi-thread"] }
|
tokio = { version = "1.39", features = ["macros", "rt-multi-thread"] }
|
||||||
tokio-util = { version = "0.7.11", features = ["io"] }
|
tokio-util = { version = "0.7.11", features = ["io"] }
|
||||||
|
|
|
@ -7,6 +7,7 @@ use std::{
|
||||||
|
|
||||||
use lasso2::ThreadedRodeo;
|
use lasso2::ThreadedRodeo;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use tinyvec::TinyVec;
|
||||||
use trie_rs::{Trie, TrieBuilder};
|
use trie_rs::{Trie, TrieBuilder};
|
||||||
|
|
||||||
use crate::app::index::{InternPath, PathID};
|
use crate::app::index::{InternPath, PathID};
|
||||||
|
@ -139,7 +140,7 @@ impl Builder {
|
||||||
song.virtual_path
|
song.virtual_path
|
||||||
.components()
|
.components()
|
||||||
.map(|c| strings.get_or_intern(c.as_os_str().to_str().unwrap()))
|
.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