p1-6: rename StoreError::Sqlx -> Sqlite, drop dead assets_root helper

M1: `Sqlx` is a misleading leftover — this crate uses `rusqlite`, not
sqlx. Rename the variant (and the doc reference to it) to `Sqlite`. No
external pattern matches; the variant is reached only via `#[from]`.

M11: `assets_root` was an `#[allow(dead_code)]` helper introduced for a
test that never landed. Delete it so the dead-code allow goes with it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-30 17:33:50 +00:00
parent e41279de96
commit 15b4d80efc
2 changed files with 2 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
//!
//! Boundary code (`kb-app`, `kb-cli`) flattens these into `anyhow::Error`,
//! so the trait impls return `anyhow::Result` directly. Internally we
//! still distinguish `Conflict` (e.g. checksum mismatch) from `Sqlx` /
//! still distinguish `Conflict` (e.g. checksum mismatch) from `Sqlite` /
//! `Migration` so callers that downcast can route refusal-style flows.
use thiserror::Error;
@@ -10,7 +10,7 @@ use thiserror::Error;
#[derive(Debug, Error)]
pub enum StoreError {
#[error("sqlite error: {0}")]
Sqlx(#[from] rusqlite::Error),
Sqlite(#[from] rusqlite::Error),
#[error("migration error: {0}")]
Migration(String),

View File

@@ -397,10 +397,3 @@ fn expand_data_dir(raw: &str) -> PathBuf {
fn dirs_home_fallback() -> Option<PathBuf> {
None
}
/// Returns the root of the assets shard tree (`data_dir/assets/`). Used
/// by tests; kept crate-private otherwise.
#[allow(dead_code)]
pub(crate) fn assets_root(data_dir: &Path) -> PathBuf {
data_dir.join(ASSETS_SUBDIR)
}