From b9dce3ddfc14d02967af75aa2ce8a87cb6036b45 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Sat, 19 Nov 2022 17:42:09 +0000 Subject: [PATCH] rustfmt --- yama/src/pile/local_sqlitebloblogs.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/yama/src/pile/local_sqlitebloblogs.rs b/yama/src/pile/local_sqlitebloblogs.rs index a37ddf8..38bbec8 100644 --- a/yama/src/pile/local_sqlitebloblogs.rs +++ b/yama/src/pile/local_sqlitebloblogs.rs @@ -22,12 +22,15 @@ use std::io::{Read, Seek, SeekFrom, Write}; use std::os::unix::fs::MetadataExt; use std::path::{Path, PathBuf}; use std::sync::{Arc, Condvar, Mutex}; +use std::time::Duration; use std::{fs, thread}; use anyhow::{bail, ensure, Context}; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use crossbeam_channel::{Receiver, Sender}; use log::{info, warn}; use nix::unistd::sync; +use rusqlite::ffi::ErrorCode::ConstraintViolation; use rusqlite::{params, Error, ErrorCode, Transaction, TransactionBehavior, NO_PARAMS}; use rusqlite::{Connection, OptionalExtension}; @@ -38,9 +41,6 @@ use crate::pile::{ }; use crate::progress::ProgressTracker; 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. pub const MAX_BLOBLOG_REUSE_SIZE: u64 = 2 * 1024 * 1024 * 1024; @@ -1146,9 +1146,10 @@ impl Iterator for KeyIterator { #[cfg(test)] mod tests { - use crate::pile::local_sqlitebloblogs::Bloblog; use temp_dir::TempDir; + use crate::pile::local_sqlitebloblogs::Bloblog; + #[test] pub fn bloblog_read_write_test() { let td = TempDir::new().unwrap();