Setup rustfmt for everything and address cargo clippy.

This commit is contained in:
2022-06-24 15:14:44 -07:00
parent 5e7139f0ba
commit 1ca903c64b
16 changed files with 41 additions and 44 deletions

View File

@@ -11,7 +11,6 @@ use actix_web::Path;
use actix_web::Query;
use actix_web::Result;
use askama::Template;
use image;
use log::info;
use rand::SeedableRng;
use rand_xorshift::XorShiftRng;
@@ -26,19 +25,12 @@ use renderer::texture::NoiseTexture;
use renderer::texture::Texture;
use renderer::vec3::Vec3;
#[derive(Debug, StructOpt)]
#[derive(StructOpt)]
#[structopt(name = "noise_explorer", about = "CLI for exploring Perlin noise")]
struct Opt {
/// HTTP listen address
#[structopt(long = "addr", default_value = "0.0.0.0:8889")]
pub addr: String,
/// Width of noise images
#[structopt(short = "w", long = "width", default_value = "128")]
pub width: u32,
/// Height of noise images
#[structopt(short = "h", long = "height", default_value = "128")]
pub height: u32,
}
#[derive(Copy, Clone, Debug, Deserialize, PartialEq)]
@@ -63,11 +55,6 @@ struct OptionalParams {
pixel_scale: f32,
}
#[derive(Debug, Deserialize)]
struct NoiseSourceParam {
noise_source: NoiseSource,
}
#[derive(Debug, Deserialize)]
struct NoiseParams {
width: u32,