Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
JayKickliter committed Nov 8, 2023
1 parent 5db9747 commit da6f754
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions hexit/src/combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use geo::{coord, GeometryCollection, Intersects};
use h3o::{CellIndex, LatLng};
use hextree::{compaction::EqCompactor, disktree::DiskTree, Cell, HexTreeMap};
use indicatif::MultiProgress;
use std::{fs::File, io::BufReader, path::Path};
use std::{ffi::OsStr, fs::File, io::BufReader, path::Path};

impl Combine {
pub fn run(&self) -> Result<()> {
Expand All @@ -33,7 +33,7 @@ impl Combine {
let mut rdr = GzDecoder::new(tess_buf_rdr);
let tess_file_name = tess_file_path
.file_name()
.and_then(|n| n.to_str())
.and_then(OsStr::to_str)
.expect("already opened, therefore path must be a file");

let n_samples = rdr.read_u64::<LE>()?;
Expand Down Expand Up @@ -73,7 +73,7 @@ impl Combine {
let disktree_file_name = self
.out
.file_name()
.and_then(|n| n.to_str())
.and_then(OsStr::to_str)
.expect("already opened, therefore path must be a file");
let disktree_len = hextree.len();
let pb = progress_group.add(progress::bar(
Expand Down
3 changes: 2 additions & 1 deletion hexit/src/tesselate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use indicatif::{MultiProgress, ProgressBar};
use nasadem::{Sample, Tile};
use rayon::prelude::*;
use std::{
ffi::OsStr,
fs::{self, File},
io::{BufWriter, Write},
path::Path,
Expand All @@ -35,7 +36,7 @@ impl Tesselate {
let out_file_name = {
let file_name = height_file_path
.file_name()
.and_then(|n| n.to_str())
.and_then(OsStr::to_str)
.expect("already opened, therefore path must be a file");
format!("{file_name}.res{}.h3tez", self.resolution)
};
Expand Down

0 comments on commit da6f754

Please sign in to comment.