diff --git a/Cargo.lock b/Cargo.lock index 86736d9..1cb03d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,7 +168,7 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "dive-deco" -version = "4.3.3" +version = "4.3.4" dependencies = [ "criterion", ] diff --git a/Cargo.toml b/Cargo.toml index e27bd0b..62e288d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dive-deco" -version = "4.3.3" +version = "4.3.4" edition = "2021" license = "MIT" description = "A dive decompression models library (Buehlmann ZH-L 16C)" diff --git a/src/buehlmann/compartment.rs b/src/buehlmann/compartment.rs index e114812..69e4df6 100644 --- a/src/buehlmann/compartment.rs +++ b/src/buehlmann/compartment.rs @@ -28,7 +28,7 @@ pub struct Compartment { model_config: BuehlmannConfig, } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Clone)] pub struct Supersaturation { pub gf_99: f64, pub gf_surf: f64, diff --git a/src/common/deco.rs b/src/common/deco.rs index 7e0c513..b397196 100644 --- a/src/common/deco.rs +++ b/src/common/deco.rs @@ -38,7 +38,7 @@ pub struct Deco { sim: bool, } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Default, Clone)] pub struct DecoRuntime { // runtime pub deco_stages: Vec, @@ -53,7 +53,7 @@ pub struct DecoRuntime { #[derive(Debug)] struct MissedDecoStopViolation; -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Clone)] pub enum DecoCalculationError { EmptyGasList, CurrentGasNotInList, diff --git a/src/common/deco_model.rs b/src/common/deco_model.rs index adfc8cd..cdc1b2c 100644 --- a/src/common/deco_model.rs +++ b/src/common/deco_model.rs @@ -26,7 +26,7 @@ pub trait DecoModelConfig { fn round_ceiling(&self) -> bool; } -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct DiveState { pub depth: Depth, pub time: Seconds, diff --git a/src/lib.rs b/src/lib.rs index a829808..1b73a38 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,6 @@ pub use buehlmann::{BuehlmannConfig, BuehlmannModel, Supersaturation}; pub use common::{ CeilingType, Deco, DecoCalculationError, DecoModel, DecoRuntime, DecoStage, DecoStageType, - Depth, Gas, GradientFactors, Minutes, MinutesSigned, NDLType, Pressure, RecordData, Seconds, - Sim, + Depth, DiveState, Gas, GradientFactors, Minutes, MinutesSigned, NDLType, Pressure, RecordData, + Seconds, Sim, };