Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
duplexsystem committed Apr 10, 2023
1 parent ca36748 commit b514448
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ impl Chunk {
directory: &'static str,
chunk_coords: IVec2,
) -> Result<MemoryMappedFile, Error> {
Ok(MemoryMappedFile::open_file(
MemoryMappedFile::open_file(
4096,
Path::new(&format!(
"{}/c.{}.{}.mcc",
directory, chunk_coords.x, chunk_coords.y
)),
false,
)?)
)
}
}
2 changes: 1 addition & 1 deletion src/random_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl SpecializedFile for RandomFile {
fn get_file_size(self) -> Result<(Box<dyn SpecializedFile + Send + Sync>, usize), Error> {
let file = self.file.try_into_inner().unwrap();
let size = file.metadata()?.len() as usize;
return Ok((Box::new(specialize_file(file)?), size));
Ok((Box::new(specialize_file(file)?), size))
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/region_file_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub(crate) fn get_chunk_region_coords(chunk_coords: IVec2) -> IVec2 {

#[inline]
pub(crate) fn get_chunk_location(chunk_region_coords: IVec2) -> i32 {
(4 * ((chunk_region_coords.x) + (chunk_region_coords.y) * 32))
4 * ((chunk_region_coords.x) + (chunk_region_coords.y) * 32)
}

#[inline]
Expand Down
2 changes: 1 addition & 1 deletion src/sequential_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl SpecializedFile for SequentialFile {

fn get_file_size(self) -> Result<(Box<dyn SpecializedFile + Send + Sync>, usize), Error> {
let size = self.file.metadata()?.len() as usize;
return Ok((Box::new(self), size));
Ok((Box::new(self), size))
}
}

Expand Down

0 comments on commit b514448

Please sign in to comment.