Skip to content
Open
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
2 changes: 2 additions & 0 deletions aw-datastore/src/legacy_import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ use rusqlite::Connection;

#[derive(Debug, Clone)]
pub enum LegacyDatastoreImportError {
#[allow(dead_code)]
SQLPrepareError(String),
#[allow(dead_code)]
SQLMapError(String),
}

Expand Down
2 changes: 2 additions & 0 deletions aw-datastore/src/privacy_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ impl PrivacyFilterEngine {

/// Example rules for common sensitive data patterns.
/// Not applied automatically — use `new()` with these rules to opt in.
#[allow(dead_code)]
pub fn with_defaults() -> Self {
let rules = vec![
PrivacyFilterRule {
Expand Down Expand Up @@ -173,6 +174,7 @@ impl PrivacyFilterEngine {
}

/// Serialize rules to JSON string.
#[allow(dead_code)]
pub fn to_json(&self) -> Result<String, String> {
serde_json::to_string(&self.rules)
.map_err(|e| format!("Failed to serialize privacy filter rules: {e}"))
Expand Down
1 change: 1 addition & 0 deletions aw-models/src/tryvec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use std::fmt::Debug;
#[derive(Debug, Clone)]
pub enum TryParse<T: JsonSchema> {
Parsed(T),
#[allow(dead_code)]
Unparsed(Value),
NotPresent,
}
Expand Down
1 change: 1 addition & 0 deletions aw-query/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub struct Program {

#[derive(Debug, Clone)]
pub struct Expr {
#[allow(dead_code)]
pub span: Span,
pub node: Expr_,
}
Expand Down
7 changes: 0 additions & 7 deletions aw-sync/src/accessmethod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pub trait AccessMethod: std::fmt::Debug {
fn insert_events(&self, bucket_id: &str, events: Vec<Event>) -> Result<(), String>;
fn get_event_count(&self, bucket_id: &str) -> Result<i64, String>;
fn heartbeat(&self, bucket_id: &str, event: Event, duration: f64) -> Result<(), String>;
fn close(&self);
}

impl AccessMethod for Datastore {
Expand Down Expand Up @@ -59,9 +58,6 @@ impl AccessMethod for Datastore {
fn get_event_count(&self, bucket_id: &str) -> Result<i64, String> {
Ok(Datastore::get_event_count(self, bucket_id, None, None).unwrap())
}
fn close(&self) {
Datastore::close(self);
}
}

impl AccessMethod for AwClient {
Expand Down Expand Up @@ -105,7 +101,4 @@ impl AccessMethod for AwClient {
fn heartbeat(&self, bucket_id: &str, event: Event, duration: f64) -> Result<(), String> {
AwClient::heartbeat(self, bucket_id, &event, duration).map_err(|e| format!("{e:?}"))
}
fn close(&self) {
// NOP
}
}
1 change: 1 addition & 0 deletions aw-sync/src/dirs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub fn get_config_dir() -> Result<PathBuf, Box<dyn Error>> {
}

#[cfg(not(target_os = "android"))]
#[allow(dead_code)]
pub fn get_server_config_path(testing: bool) -> Result<PathBuf, ()> {
let dir = aw_server::dirs::get_config_dir()?;
Ok(dir.join(if testing {
Expand Down
1 change: 1 addition & 0 deletions aw-sync/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub struct SyncSpec {
/// Bucket IDs to sync
pub buckets: Option<Vec<String>>,
/// Start of time range to sync
#[allow(dead_code)]
pub start: Option<DateTime<Utc>>,
}

Expand Down
1 change: 1 addition & 0 deletions aw-sync/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::path::{Path, PathBuf};

/// Returns the port of the local aw-server instance
#[cfg(not(target_os = "android"))]
#[allow(dead_code)]
pub fn get_server_port(testing: bool) -> Result<u16, Box<dyn Error>> {
// TODO: get aw-server config more reliably
let aw_server_conf = crate::dirs::get_server_config_path(testing)
Expand Down
Loading