Skip to content

Commit 49f600a

Browse files
committed
fix clippy
1 parent b900ee7 commit 49f600a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

optd-persistent/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(dead_code)]
22

3-
use std::cell::LazyCell;
3+
use std::sync::LazyLock;
44

55
use sea_orm::*;
66
use sea_orm_migration::prelude::*;
@@ -17,7 +17,7 @@ pub const DATABASE_FILENAME: &str = "sqlite.db";
1717
pub const DATABASE_URL: &str = "sqlite:./sqlite.db?mode=rwc";
1818

1919
pub const TEST_DATABASE_FILENAME: &str = "init.db";
20-
pub const TEST_DATABASE_FILE: LazyCell<String> = LazyCell::new(|| {
20+
pub static TEST_DATABASE_FILE: LazyLock<String> = LazyLock::new(|| {
2121
std::env::current_dir()
2222
.unwrap()
2323
.join("src")
@@ -27,8 +27,8 @@ pub const TEST_DATABASE_FILE: LazyCell<String> = LazyCell::new(|| {
2727
.unwrap()
2828
.to_owned()
2929
});
30-
pub const TEST_DATABASE_URL: LazyCell<String> =
31-
LazyCell::new(|| get_sqlite_url(TEST_DATABASE_FILE.as_str()));
30+
pub static TEST_DATABASE_URL: LazyLock<String> =
31+
LazyLock::new(|| get_sqlite_url(TEST_DATABASE_FILE.as_str()));
3232

3333
fn get_sqlite_url(file: &str) -> String {
3434
format!("sqlite:{}?mode=rwc", file)

0 commit comments

Comments
 (0)