mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-26 19:41:37 +08:00
Remove lazy_static block where possible
This commit is contained in:
parent
c7bf569359
commit
5f5943435e
@ -137,9 +137,7 @@ mod test {
|
|||||||
#[test]
|
#[test]
|
||||||
#[ignore] // FIXME: unstable
|
#[ignore] // FIXME: unstable
|
||||||
fn test_busy_handler() {
|
fn test_busy_handler() {
|
||||||
lazy_static::lazy_static! {
|
static CALLED: AtomicBool = AtomicBool::new(false);
|
||||||
static ref CALLED: AtomicBool = AtomicBool::new(false);
|
|
||||||
}
|
|
||||||
fn busy_handler(_: i32) -> bool {
|
fn busy_handler(_: i32) -> bool {
|
||||||
CALLED.store(true, Ordering::Relaxed);
|
CALLED.store(true, Ordering::Relaxed);
|
||||||
thread::sleep(Duration::from_millis(100));
|
thread::sleep(Duration::from_millis(100));
|
||||||
|
@ -301,7 +301,6 @@ unsafe fn free_boxed_hook<F>(p: *mut c_void) {
|
|||||||
mod test {
|
mod test {
|
||||||
use super::Action;
|
use super::Action;
|
||||||
use crate::Connection;
|
use crate::Connection;
|
||||||
use lazy_static::lazy_static;
|
|
||||||
use std::sync::atomic::{AtomicBool, Ordering};
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -365,9 +364,7 @@ mod test {
|
|||||||
fn test_progress_handler() {
|
fn test_progress_handler() {
|
||||||
let db = Connection::open_in_memory().unwrap();
|
let db = Connection::open_in_memory().unwrap();
|
||||||
|
|
||||||
lazy_static! {
|
static CALLED: AtomicBool = AtomicBool::new(false);
|
||||||
static ref CALLED: AtomicBool = AtomicBool::new(false);
|
|
||||||
}
|
|
||||||
db.progress_handler(
|
db.progress_handler(
|
||||||
1,
|
1,
|
||||||
Some(|| {
|
Some(|| {
|
||||||
|
@ -819,9 +819,7 @@ mod test {
|
|||||||
db.execute_batch("CREATE TABLE foo(t TEXT PRIMARY KEY NOT NULL);")
|
db.execute_batch("CREATE TABLE foo(t TEXT PRIMARY KEY NOT NULL);")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
lazy_static::lazy_static! {
|
static CALLED: AtomicBool = AtomicBool::new(false);
|
||||||
static ref CALLED: AtomicBool = AtomicBool::new(false);
|
|
||||||
}
|
|
||||||
db.apply(
|
db.apply(
|
||||||
&changeset,
|
&changeset,
|
||||||
None::<fn(&str) -> bool>,
|
None::<fn(&str) -> bool>,
|
||||||
|
Loading…
Reference in New Issue
Block a user