id: Start from 1

This commit is contained in:
Ivan Molodetskikh
2024-06-27 09:48:42 +04:00
parent 5577021475
commit 0757ad08e7
+3 -1
View File
@@ -11,7 +11,9 @@ pub struct IdCounter {
impl IdCounter {
pub const fn new() -> 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),
}
}