diff options
Diffstat (limited to 'src/shared_state.rs')
| -rw-r--r-- | src/shared_state.rs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/shared_state.rs b/src/shared_state.rs index 554d856..c4ec9d6 100644 --- a/src/shared_state.rs +++ b/src/shared_state.rs @@ -1,7 +1,4 @@ -use smithay_client_toolkit::{ - reexports::client::QueueHandle, - shm::{slot::SlotPool, ShmState}, -}; +use smithay_client_toolkit::{reexports::client::QueueHandle, shm::slot::SlotPool}; use crate::{ config::Config, @@ -13,18 +10,9 @@ use crate::{ #[derive(Debug)] pub struct SharedState { pub qh: QueueHandle<State>, - pub shm_state: ShmState, - pub pool: Option<SlotPool>, + pub pool: SlotPool, pub config: Config, pub status_cmd: Option<StatusCmd>, pub blocks: Vec<Block>, pub blocks_cache: Vec<ComputedBlock>, } - -impl SharedState { - pub fn get_pool(&mut self, len: usize) -> &mut SlotPool { - self.pool.get_or_insert_with(|| { - SlotPool::new(len, &self.shm_state).expect("Failed to create pool") - }) - } -} |
