fn create_db() -> SqliteDb {
    let db = match SqliteDb::open(DB_PATH, &mut ContactsSchemaManager {}, 1) {
        Ok(db) => db,
        Err(err) => panic!("Failed to open contacts db: {}", err),
    };
    if let Err(err) = db.enable_wal() {
        error!("Failed to enable WAL mode on contacts db: {}", err);
    }

    db
}
// Creates a contacts database with a proper updater.
// SQlite manages itself thread safety so we can use
// multiple ones without having to use Rust mutexes.
Creates a contacts database with a proper updater.
SQlite manages itself thread safety so we can use
multiple ones without having to use Rust mutexes.
Creates a contacts database with a proper updater . SQlite manages itself thread safety so we can use multiple ones without having to use Rust mutexes .
fn create_db() -> SqliteDb {
    let db = match SqliteDb::open(DB_PATH, &mut ContactsSchemaManager {}, 1) {
        Ok(db) => db,
        Err(err) => panic!("Failed to open contacts db: {}", err),
    };
    if let Err(err) = db.enable_wal() {
        error!("Failed to enable WAL mode on contacts db: {}", err);
    }
    db
}
fn create_db ( ) -> SqliteDb { let db = match SqliteDb :: open ( DB_PATH , & mut ContactsSchemaManager { } , 1 ) { Ok ( db ) => db , Err ( err ) => panic ! ( " " err ) , } ; if let Err ( err ) = db . enable_wal ( ) { error ! ( " " err ) ; } db }
Creates a contacts database with a proper updater.
Creates a contacts database with a proper updater .