Skip to content

Commit

Permalink
more clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredly committed May 18, 2019
1 parent cb2db11 commit 845162a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions src/main.rs
Expand Up @@ -307,7 +307,7 @@ fn handle_transition(
Some(zoom) => {
let stl = match zoom.cut {
Some(cut) => status.file.to_hex_stl(&cut, zoom.sample),
None => status.file.into_stl(&zoom.coords, zoom.sample, 1.0),
None => status.file.to_stl(&zoom.coords, zoom.sample, 1.0),
};

match stl {
Expand Down Expand Up @@ -585,7 +585,7 @@ impl Statusable for Option<Status> {
.h(HEIGHT)
.w(50.0)
.set(ids.crop, ui)
.into_iter().next()
.next()
{
let total = coords.w * coords.h;
let max_points = 10_000_000;
Expand Down Expand Up @@ -615,7 +615,6 @@ impl Statusable for Option<Status> {
.w(80.0)
.h(HEIGHT)
.set(ids.open_file, ui)
.into_iter()
.next()
{
if let Ok(nfd::Response::Okay(file_path)) = nfd::open_file_dialog(Some("adf,tif"), None) {
Expand Down Expand Up @@ -671,7 +670,6 @@ impl Statusable for Option<Status> {
.h(HEIGHT)
.enabled(zoom.sample > 1)
.set(ids.sample_less, ui)
.into_iter()
.next()
{
if zoom.sample > 1 {
Expand All @@ -685,7 +683,7 @@ impl Statusable for Option<Status> {
.w(90.0)
.h(HEIGHT)
.enabled(zoom.sample < 100)
.set(ids.sample_greater, ui).into_iter().next()
.set(ids.sample_greater, ui).next()
{
if zoom.sample < 100 {
return Some(Transition::Resolution(zoom.sample + 1));
Expand All @@ -697,7 +695,7 @@ impl Statusable for Option<Status> {
.right_from(ids.sample_greater, 10.0)
.w(60.0)
.h(HEIGHT)
.set(ids.export, ui).into_iter().next()
.set(ids.export, ui).next()
{
return Some(Transition::Export);
}
Expand All @@ -707,7 +705,7 @@ impl Statusable for Option<Status> {
.right_from(ids.export, 10.0)
.w(60.0)
.h(HEIGHT)
.set(ids.reset, ui).into_iter().next()
.set(ids.reset, ui).next()
{
return Some(Transition::Reset);
}
Expand All @@ -718,7 +716,7 @@ impl Statusable for Option<Status> {
.right_from(ids.reset, 10.0)
.w(30.0)
.h(HEIGHT)
.set(ids.cut, ui).into_iter().next()
.set(ids.cut, ui).next()
{
return Some(Transition::Cut(hselection_to_hex(
&zoom.coords,
Expand Down
2 changes: 1 addition & 1 deletion src/terrain.rs
Expand Up @@ -133,7 +133,7 @@ impl File {
self.get_hex_terrain(hex, sample).map(Terrain::into_stl)
}

pub fn into_stl(
pub fn to_stl(
&self,
coords: &Coords,
sample: usize,
Expand Down

0 comments on commit 845162a

Please sign in to comment.