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:
@@ -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),
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user