Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,15 @@ package-lock.json
*.log
tmp/
.bg-shell/

# ── Kata baseline (auto-generated) ──
.next/
dist/
build/
__pycache__/
*.pyc
.venv/
venv/
vendor/
coverage/
.cache/
2 changes: 1 addition & 1 deletion crates/cupel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ serde = { version = "1", features = ["derive"], optional = true }
thiserror = "2"

[dev-dependencies]
toml = "0.8"
toml = "1.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"

Expand Down
8 changes: 5 additions & 3 deletions crates/cupel/tests/conformance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ mod conformance {
let path = base.join(relative_path);
let content = std::fs::read_to_string(&path)
.unwrap_or_else(|e| panic!("failed to read {}: {e}", path.display()));
content
.parse::<Value>()
.unwrap_or_else(|e| panic!("failed to parse TOML {}: {e}", path.display()))
// toml 0.9+ changed Value::from_str to parse values, not documents.
// Use from_str::<Table> for document parsing, then wrap for downstream compatibility.
let table: toml::Table = toml::from_str(&content)
.unwrap_or_else(|e| panic!("failed to parse TOML {}: {e}", path.display()));
Value::Table(table)
}

/// Parse a TOML datetime value to chrono::DateTime<Utc>.
Expand Down
8 changes: 5 additions & 3 deletions crates/cupel/tests/count_constrained_knapsack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ fn load_vector(relative_path: &str) -> Value {
let path = base.join(relative_path);
let content = std::fs::read_to_string(&path)
.unwrap_or_else(|e| panic!("failed to read {}: {e}", path.display()));
content
.parse::<Value>()
.unwrap_or_else(|e| panic!("failed to parse TOML {}: {e}", path.display()))
// toml 0.9+ changed Value::from_str to parse values, not documents.
// Use from_str::<Table> for document parsing, then wrap for downstream compatibility.
let table: toml::Table = toml::from_str(&content)
.unwrap_or_else(|e| panic!("failed to parse TOML {}: {e}", path.display()));
Value::Table(table)
}

fn build_scored_items(vector: &Value) -> Vec<ScoredItem> {
Expand Down
Loading