clippy
This commit is contained in:
parent
588db169f8
commit
ae03d52c0c
3 changed files with 6 additions and 6 deletions
|
|
@ -57,7 +57,7 @@ impl EntryHeaderWithDataSize {
|
|||
}
|
||||
|
||||
pub fn decode(bytes: &mut [u8], number_of_columns: usize) -> Result<Self> {
|
||||
let (is_deleted, _) = decode::<bool>(&bytes)
|
||||
let (is_deleted, _) = decode::<bool>(bytes)
|
||||
.map_err(|e| Error::DecodeError(DecodeErrorKind::EntryIsDeleted, e))?;
|
||||
|
||||
let data_sizes =
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ impl StoreHeader {
|
|||
.map_err(|e| Error::DecodeError(DecodeErrorKind::StoreHeaderIndexedColumns, e))?;
|
||||
|
||||
Ok(StoreHeader {
|
||||
table_folder: header.table_folder.into(),
|
||||
table_folder: header.table_folder,
|
||||
number_of_columns: header.number_of_columns,
|
||||
deleted_count: header.deleted_count,
|
||||
total_count: header.total_count,
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ impl<T> Store<T> {
|
|||
pub fn path_to_index_file(header: &StoreHeader, column: Column) -> PathBuf {
|
||||
let path_to_table = Path::new(&header.table_folder);
|
||||
let path_to_index =
|
||||
path_to_table.join(&format!("{}_{}", ROWS_FILE_NAME, column.to_string()));
|
||||
path_to_table.join(&format!("{}_{}", ROWS_FILE_NAME, column));
|
||||
path_to_index
|
||||
}
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ impl<T> Store<T> {
|
|||
where
|
||||
T: Encode + Decode + Ord,
|
||||
{
|
||||
let path_to_index = Self::path_to_index_file(&header, column);
|
||||
let path_to_index = Self::path_to_index_file(header, column);
|
||||
let index = Index::new(path_to_index).await?;
|
||||
|
||||
Ok(index)
|
||||
|
|
@ -98,7 +98,7 @@ impl<T> Store<T> {
|
|||
}
|
||||
|
||||
result[header.primary_column as usize] =
|
||||
Some(Self::create_empty_index_at(&header, header.primary_column).await?);
|
||||
Some(Self::create_empty_index_at(header, header.primary_column).await?);
|
||||
|
||||
Ok(result)
|
||||
}
|
||||
|
|
@ -110,7 +110,7 @@ impl<T> Store<T> {
|
|||
where
|
||||
T: Encode + Decode + Ord,
|
||||
{
|
||||
let path_to_index = Self::path_to_index_file(&header, column);
|
||||
let path_to_index = Self::path_to_index_file(header, column);
|
||||
let index: Index<T, FilePosition> = Index::connect(path_to_index).await?;
|
||||
Ok(index)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue