Skip to content

Commit

Permalink
Use static TEST_USER_ID with OnceLock
Browse files Browse the repository at this point in the history
  • Loading branch information
van-sprundel committed Oct 14, 2024
1 parent 82765a0 commit d1eee33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/system/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,9 @@ impl SessionRecord {
mod tests {
use super::*;
use crate::system::tests::tempfile;
use std::cell::OnceCell;
use std::sync::OnceLock;

const TEST_USER_ID: OnceCell<UserId> = OnceCell::new();
static TEST_USER_ID: OnceLock<UserId> = OnceLock::new();
fn test_user_id() -> UserId {
*TEST_USER_ID.get_or_init(|| UserId::new(1000))
}
Expand Down

0 comments on commit d1eee33

Please sign in to comment.