From 6fd081a51d9cde8a581195d2a8d992578f3283f5 Mon Sep 17 00:00:00 2001 From: DanielDK05 <62153701+DanielDK05@users.noreply.github.com> Date: Tue, 7 May 2024 00:25:25 +0200 Subject: [PATCH] =?UTF-8?q?[Rust]=C2=A0Added=20clone,=20debug=20derive=20f?= =?UTF-8?q?or=20`FastNoiseLite`=20=20(#138)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added clone derive * Added `Debug` derive --- Rust/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Rust/src/lib.rs b/Rust/src/lib.rs index 174fe3d..6098eb8 100644 --- a/Rust/src/lib.rs +++ b/Rust/src/lib.rs @@ -52,7 +52,6 @@ // Discord: Keavon (preferred) | Email: see for the address | GitHub: Keavon (https://github.com/Keavon) #![doc = include_str!("../README.md")] - #![cfg_attr(not(feature = "std"), no_std)] #![allow(clippy::excessive_precision)] @@ -182,15 +181,15 @@ pub enum TransformType3D { /// /// ```rs /// use fastnoise_lite::*; -/// +/// /// // Create and configure the FastNoise object /// let mut noise = FastNoiseLite::new(); /// noise.set_noise_type(Some(NoiseType::OpenSimplex2)); -/// +/// /// const WIDTH: usize = 128; /// const HEIGHT: usize = 128; /// let mut noise_data = [[0.; HEIGHT]; WIDTH]; -/// +/// /// // Sample noise pixels /// for x in 0..WIDTH { /// for y in 0..HEIGHT { @@ -207,6 +206,7 @@ pub enum TransformType3D { /// /// // Do something with this data... /// ``` +#[derive(Clone, Debug)] pub struct FastNoiseLite { pub seed: i32, pub frequency: f32,