rustfmt
This commit is contained in:
parent
52202874f2
commit
b9dce3ddfc
|
@ -22,12 +22,15 @@ use std::io::{Read, Seek, SeekFrom, Write};
|
||||||
use std::os::unix::fs::MetadataExt;
|
use std::os::unix::fs::MetadataExt;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::sync::{Arc, Condvar, Mutex};
|
use std::sync::{Arc, Condvar, Mutex};
|
||||||
|
use std::time::Duration;
|
||||||
use std::{fs, thread};
|
use std::{fs, thread};
|
||||||
|
|
||||||
use anyhow::{bail, ensure, Context};
|
use anyhow::{bail, ensure, Context};
|
||||||
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
|
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
|
||||||
|
use crossbeam_channel::{Receiver, Sender};
|
||||||
use log::{info, warn};
|
use log::{info, warn};
|
||||||
use nix::unistd::sync;
|
use nix::unistd::sync;
|
||||||
|
use rusqlite::ffi::ErrorCode::ConstraintViolation;
|
||||||
use rusqlite::{params, Error, ErrorCode, Transaction, TransactionBehavior, NO_PARAMS};
|
use rusqlite::{params, Error, ErrorCode, Transaction, TransactionBehavior, NO_PARAMS};
|
||||||
use rusqlite::{Connection, OptionalExtension};
|
use rusqlite::{Connection, OptionalExtension};
|
||||||
|
|
||||||
|
@ -38,9 +41,6 @@ use crate::pile::{
|
||||||
};
|
};
|
||||||
use crate::progress::ProgressTracker;
|
use crate::progress::ProgressTracker;
|
||||||
use crate::utils::{bytes_to_hexstring, LruMap};
|
use crate::utils::{bytes_to_hexstring, LruMap};
|
||||||
use crossbeam_channel::{Receiver, Sender};
|
|
||||||
use rusqlite::ffi::ErrorCode::ConstraintViolation;
|
|
||||||
use std::time::Duration;
|
|
||||||
|
|
||||||
/// Bloblogs will not be reused if they are already 2 GiB large.
|
/// Bloblogs will not be reused if they are already 2 GiB large.
|
||||||
pub const MAX_BLOBLOG_REUSE_SIZE: u64 = 2 * 1024 * 1024 * 1024;
|
pub const MAX_BLOBLOG_REUSE_SIZE: u64 = 2 * 1024 * 1024 * 1024;
|
||||||
|
@ -1146,9 +1146,10 @@ impl Iterator for KeyIterator {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::pile::local_sqlitebloblogs::Bloblog;
|
|
||||||
use temp_dir::TempDir;
|
use temp_dir::TempDir;
|
||||||
|
|
||||||
|
use crate::pile::local_sqlitebloblogs::Bloblog;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn bloblog_read_write_test() {
|
pub fn bloblog_read_write_test() {
|
||||||
let td = TempDir::new().unwrap();
|
let td = TempDir::new().unwrap();
|
||||||
|
|
Loading…
Reference in New Issue