mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 08:44:40 +01:00
remove lazy_static dependency
This commit is contained in:
parent
9de3fd861c
commit
ee69e5865a
4 changed files with 4 additions and 13 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -280,7 +280,6 @@ dependencies = [
|
|||
"gtk4",
|
||||
"hex",
|
||||
"image",
|
||||
"lazy_static",
|
||||
"libhandy4",
|
||||
"log",
|
||||
"once_cell",
|
||||
|
|
|
@ -12,7 +12,6 @@ futures = "0.3"
|
|||
gettext-rs = {version = "0.5", features = ["gettext-system"]}
|
||||
gtk-macros = "0.2"
|
||||
image = "0.23"
|
||||
lazy_static = "1.4"
|
||||
log = "0.4"
|
||||
pretty_env_logger = "0.4"
|
||||
quick-xml = "0.20"
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate diesel_migrations;
|
||||
#[macro_use]
|
||||
extern crate diesel;
|
||||
#[macro_use]
|
||||
extern crate glib;
|
||||
#[macro_use]
|
||||
extern crate gtk_macros;
|
||||
extern crate diesel_migrations;
|
||||
|
||||
use gettextrs::*;
|
||||
mod application;
|
||||
|
|
|
@ -4,13 +4,12 @@ use diesel::r2d2;
|
|||
use diesel::r2d2::ConnectionManager;
|
||||
use std::path::PathBuf;
|
||||
use std::{fs, fs::File};
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
type Pool = r2d2::Pool<ConnectionManager<SqliteConnection>>;
|
||||
|
||||
lazy_static! {
|
||||
static ref DB_PATH: PathBuf = glib::get_user_data_dir().join("authenticator");
|
||||
static ref POOL: Pool = init_pool().expect("Failed to create a pool");
|
||||
}
|
||||
static DB_PATH: Lazy<PathBuf> = Lazy::new(|| glib::get_user_data_dir().join("authenticator"));
|
||||
static POOL: Lazy<Pool> = Lazy::new(|| init_pool().expect("Failed to create a pool"));
|
||||
|
||||
embed_migrations!("migrations/");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue