storage: remove Clone off write handle

This commit is contained in:
hinto.janai 2024-10-07 19:51:21 -04:00
parent c886f807dd
commit 4fa37deec5
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
2 changed files with 4 additions and 5 deletions

View file

@ -21,10 +21,9 @@
//! //!
//! The 2nd allows any caller to send [`WriteRequest`][req_w]s. //! The 2nd allows any caller to send [`WriteRequest`][req_w]s.
//! //!
//! The [`BlockchainReadHandle`] can be shared as it is cheaply [`Clone`]able. //! The [`BlockchainReadHandle`] can be shared as it is cheaply [`Clone`]able, however,
//! //! the [`BlockchainWriteHandle`] cannot be cloned. There is only 1 place in Cuprate that
//! Although [`BlockchainWriteHandle`] can also be cloned, there is only 1 place //! writes, so it is passed there and used.
//! in Cuprate that writes (the blockchain manager), so it is passed there and used.
//! //!
//! ## Initialization //! ## Initialization
//! The database & thread-pool system can be initialized with [`init()`]. //! The database & thread-pool system can be initialized with [`init()`].

View file

@ -21,7 +21,7 @@ const WRITER_THREAD_NAME: &str = concat!(module_path!(), "::DatabaseWriter");
/// Calling [`tower::Service::call`] with a [`DatabaseWriteHandle`] /// Calling [`tower::Service::call`] with a [`DatabaseWriteHandle`]
/// will return an `async`hronous channel that can be `.await`ed upon /// will return an `async`hronous channel that can be `.await`ed upon
/// to receive the corresponding response. /// to receive the corresponding response.
#[derive(Clone, Debug)] #[derive(Debug)]
pub struct DatabaseWriteHandle<Req, Res> { pub struct DatabaseWriteHandle<Req, Res> {
/// Sender channel to the database write thread-pool. /// Sender channel to the database write thread-pool.
/// ///