Skip to content

Commit

Permalink
Derive Clone for State
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Feb 29, 2024
1 parent 4800616 commit d7ff3b7
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,11 @@ pub async fn start(state: State, server: String, port: u16) -> Result<()> {
Ok(())
}

#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct State {
inner: Arc<InnerState>,
}

impl Clone for State {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
}
}
}

#[derive(Debug)]
pub struct InnerState {
db: sled::Db,
Expand Down

0 comments on commit d7ff3b7

Please sign in to comment.