Make WorkspaceId inner field private

This commit is contained in:
Ivan Molodetskikh
2024-08-31 10:25:56 +03:00
parent 52265e2e19
commit 446a9f1e06
2 changed files with 10 additions and 6 deletions
+5 -1
View File
@@ -123,12 +123,16 @@ pub struct OutputId(String);
static WORKSPACE_ID_COUNTER: IdCounter = IdCounter::new();
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WorkspaceId(pub u32);
pub struct WorkspaceId(u32);
impl WorkspaceId {
fn next() -> WorkspaceId {
WorkspaceId(WORKSPACE_ID_COUNTER.next())
}
pub fn get(self) -> u64 {
u64::from(self.0)
}
}
niri_render_elements! {