Auto-update fts index
Some checks failed
CI / Typos (push) Successful in 15s
CI / Clippy (push) Successful in 1m5s
CI / Build and test (push) Failing after 1m2s

This commit is contained in:
2026-02-21 15:55:10 -08:00
parent 5d8ad4665d
commit 141839ae55
36 changed files with 1119 additions and 275 deletions

View File

@@ -8,7 +8,7 @@ name = "dataset"
#
# working_dir = ".pile"
# Data sources avaliable in this dataset
# Data sources available in this dataset
source."music" = { type = "flac", path = ["music", "music-2"] }
@@ -19,7 +19,7 @@ source."music" = { type = "flac", path = ["music", "music-2"] }
#
# "field-name" = {
# # The type of data this field contains.
# # only text is supportedin this verison.
# # only text is supported in this version.
# type = "text",
#
# # An array of jsonpaths (rfc9535) used to extract this field from each source entry.

View File

@@ -10,8 +10,9 @@ pub use misc::*;
pub static INIT_DB_TOML: &str = include_str!("./config.toml");
#[test]
#[expect(clippy::unwrap_used)]
fn init_db_toml_valid() {
toml::from_str::<ConfigToml>(INIT_DB_TOML).unwrap();
toml::from_str::<ConfigToml>(INIT_DB_TOML).expect("INIT_DB_TOML should be valid TOML");
}
#[derive(Debug, Clone, Deserialize)]

View File

@@ -22,7 +22,7 @@ impl<T: Debug + Clone> OneOrMany<T> {
pub fn as_slice(&self) -> &[T] {
match self {
Self::One(x) => slice::from_ref(&x),
Self::One(x) => slice::from_ref(x),
Self::Many(x) => &x[..],
}
}

View File

@@ -62,7 +62,7 @@ impl FieldSpecPost {
Value::Bool(_) | Value::Number(_) => Value::String(val.to_string()),
Value::String(x) => {
Value::String(x.strip_suffix(trim_suffix).unwrap_or(&x).to_owned())
Value::String(x.strip_suffix(trim_suffix).unwrap_or(x).to_owned())
}
Value::Array(x) => {
@@ -73,7 +73,7 @@ impl FieldSpecPost {
x.iter()
.map(|x| {
(
x.0.strip_suffix(trim_suffix).unwrap_or(&x.0).to_owned(),
x.0.strip_suffix(trim_suffix).unwrap_or(x.0).to_owned(),
self.apply(x.1),
)
})
@@ -88,7 +88,7 @@ impl FieldSpecPost {
Value::Bool(_) | Value::Number(_) => Value::String(val.to_string()),
Value::String(x) => {
Value::String(x.strip_prefix(trim_prefix).unwrap_or(&x).to_owned())
Value::String(x.strip_prefix(trim_prefix).unwrap_or(x).to_owned())
}
Value::Array(x) => {