File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11#![ allow( dead_code) ]
22
3- use std:: cell :: LazyCell ;
3+ use std:: sync :: LazyLock ;
44
55use sea_orm:: * ;
66use sea_orm_migration:: prelude:: * ;
@@ -17,7 +17,7 @@ pub const DATABASE_FILENAME: &str = "sqlite.db";
1717pub const DATABASE_URL : & str = "sqlite:./sqlite.db?mode=rwc" ;
1818
1919pub 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
3333fn get_sqlite_url ( file : & str ) -> String {
3434 format ! ( "sqlite:{}?mode=rwc" , file)
You can’t perform that action at this time.
0 commit comments