chore(daemon): remove unused imports and dead placeholders
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,8 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
|
||||||
use tokio::sync::mpsc;
|
use tokio::sync::mpsc;
|
||||||
use tokio::time::{Duration, Instant};
|
use tokio::time::{Duration, Instant};
|
||||||
use crate::state_store::{PersistState, StateStore};
|
use crate::state_store::{PersistState, StateStore};
|
||||||
|
|
||||||
/// Debounce window: coalesce a burst of dirty signals into one save.
|
|
||||||
const DEBOUNCE: Duration = Duration::from_millis(500);
|
|
||||||
|
|
||||||
/// A handle the registry uses to request a persist. `mark_dirty(state)` records
|
/// A handle the registry uses to request a persist. `mark_dirty(state)` records
|
||||||
/// the latest snapshot and (re)arms the debounce timer.
|
/// the latest snapshot and (re)arms the debounce timer.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
@@ -59,12 +55,10 @@ pub fn spawn(store: Arc<dyn StateStore>, debounce: Duration) -> Persister {
|
|||||||
Persister { tx }
|
Persister { tx }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
fn _unused(_c: &AtomicUsize) {}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
|
|
||||||
struct CountingStore {
|
struct CountingStore {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ use std::path::PathBuf;
|
|||||||
use std::sync::atomic::{AtomicU64, Ordering};
|
use std::sync::atomic::{AtomicU64, Ordering};
|
||||||
|
|
||||||
use spacesh_proto::ids::{GroupId, SurfaceId, WorkspaceId};
|
use spacesh_proto::ids::{GroupId, SurfaceId, WorkspaceId};
|
||||||
use spacesh_proto::layout::LayoutNode;
|
|
||||||
use spacesh_proto::workspace::{Group, SurfaceSpec, SurfaceView, Workspace, WorkspaceView};
|
use spacesh_proto::workspace::{Group, SurfaceSpec, SurfaceView, Workspace, WorkspaceView};
|
||||||
|
|
||||||
use crate::state_store::PersistState;
|
use crate::state_store::PersistState;
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ async fn handle_request(
|
|||||||
exit_tx: &mpsc::UnboundedSender<(SurfaceId, i32)>,
|
exit_tx: &mpsc::UnboundedSender<(SurfaceId, i32)>,
|
||||||
persister: &Persister,
|
persister: &Persister,
|
||||||
) {
|
) {
|
||||||
use spacesh_proto::message::{SplitDir, Edge};
|
use spacesh_proto::message::SplitDir;
|
||||||
use spacesh_proto::layout::{LayoutNode, Orient};
|
use spacesh_proto::layout::{LayoutNode, Orient};
|
||||||
use spacesh_proto::workspace::SurfaceSpec;
|
use spacesh_proto::workspace::SurfaceSpec;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use std::path::{Path, PathBuf};
|
use std::path::PathBuf;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use spacesh_proto::workspace::{Group, Workspace};
|
use spacesh_proto::workspace::{Group, Workspace};
|
||||||
@@ -69,9 +69,6 @@ impl StateStore for JsonStateStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
fn touch(_p: &Path) {}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ pub enum SurfaceMsg {
|
|||||||
|
|
||||||
pub struct SurfaceHandle {
|
pub struct SurfaceHandle {
|
||||||
pub id: SurfaceId,
|
pub id: SurfaceId,
|
||||||
|
#[allow(dead_code)]
|
||||||
pub workspace_id: WorkspaceId,
|
pub workspace_id: WorkspaceId,
|
||||||
pub tx: mpsc::Sender<SurfaceMsg>,
|
pub tx: mpsc::Sender<SurfaceMsg>,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user