Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DiveState type exported, added derives #40

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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)"
Expand Down
2 changes: 1 addition & 1 deletion src/buehlmann/compartment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/buehlmann/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ mod zhl_values;

pub use buehlmann_config::BuehlmannConfig;
pub use buehlmann_model::BuehlmannModel;
pub use compartment::Supersaturation;
pub use compartment::{Compartment, Supersaturation};
4 changes: 2 additions & 2 deletions src/common/deco.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<DecoStage>,
Expand All @@ -53,7 +53,7 @@ pub struct DecoRuntime {
#[derive(Debug)]
struct MissedDecoStopViolation;

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Clone)]
pub enum DecoCalculationError {
EmptyGasList,
CurrentGasNotInList,
Expand Down
2 changes: 1 addition & 1 deletion src/common/deco_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
mod buehlmann;
mod common;

pub use buehlmann::{BuehlmannConfig, BuehlmannModel, Supersaturation};
pub use buehlmann::{BuehlmannConfig, BuehlmannModel, Compartment, 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,
};