mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-24 02:01:18 +07:00
id: Start from 1
This commit is contained in:
+3
-1
@@ -11,7 +11,9 @@ pub struct IdCounter {
|
|||||||
impl IdCounter {
|
impl IdCounter {
|
||||||
pub const fn new() -> Self {
|
pub const fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
value: AtomicU32::new(0),
|
// Start from 1 to reduce the possibility that some other code that uses these IDs will
|
||||||
|
// get confused.
|
||||||
|
value: AtomicU32::new(1),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user