fix(quotesdb): resolve compiler warnings in api and ui

- Remove redundant #![cfg(target_arch="wasm32")] from d1.rs (module
  declaration in mod.rs already gates it)
- Remove unused D1Repository re-export from db/mod.rs
- Drop unused page/total_count fields from UI ListResponse struct
  (only total_pages is consumed by the browse page)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Elijah Voigt 3 months ago
parent c52eb820d2
commit 84088ef45b

@ -6,8 +6,6 @@
//! //!
//! This module is only compiled for `wasm32-unknown-unknown` targets. //! This module is only compiled for `wasm32-unknown-unknown` targets.
#![cfg(target_arch = "wasm32")]
use super::{DbError, DeleteResult, ListResult, QuoteRepository}; use super::{DbError, DeleteResult, ListResult, QuoteRepository};
use quotesdb::{generate_auth_code, generate_id, CreateQuoteInput, Quote, UpdateQuoteInput}; use quotesdb::{generate_auth_code, generate_id, CreateQuoteInput, Quote, UpdateQuoteInput};
use wasm_bindgen::JsValue; use wasm_bindgen::JsValue;

@ -23,9 +23,6 @@ pub mod connection;
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
pub use native::NativeRepository; pub use native::NativeRepository;
#[cfg(target_arch = "wasm32")]
pub use d1::D1Repository;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
// ── Shared result types ─────────────────────────────────────────────────────── // ── Shared result types ───────────────────────────────────────────────────────

@ -17,12 +17,8 @@ use serde::Deserialize;
pub struct ListResponse { pub struct ListResponse {
/// The quotes on the current page. /// The quotes on the current page.
pub quotes: Vec<Quote>, pub quotes: Vec<Quote>,
/// Current page number (1-indexed).
pub page: u32,
/// Total number of pages available. /// Total number of pages available.
pub total_pages: u32, pub total_pages: u32,
/// Total number of quotes matching the query.
pub total_count: u32,
} }
/// Response type for `PUT /api/quotes` (create quote). /// Response type for `PUT /api/quotes` (create quote).

Loading…
Cancel
Save