Skip to content

Commit 4f04714

Browse files
committed
Better wrappers
1 parent f99eee8 commit 4f04714

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "gas-index-algorithm"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
authors = ["Jon Lamb"]
55
edition = "2021"
66
repository = "https://github.com/jonlamb-gh/gas-index-algorithm"

src/lib.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,13 @@ impl GasIndexAlgorithm {
2525

2626
pub fn new(algorithm_type: AlgorithmType, sampling_interval: f32) -> Self {
2727
let mut s = Self::new_uninitialized(algorithm_type);
28-
s.init_with_sampling_interval(algorithm_type, sampling_interval);
28+
s.init_with_sampling_interval(sampling_interval);
2929
s
3030
}
3131

32-
pub fn init_with_sampling_interval(
33-
&mut self,
34-
algorithm_type: AlgorithmType,
35-
sampling_interval: f32,
36-
) {
32+
pub fn init_with_sampling_interval(&mut self, sampling_interval: f32) {
3733
self.state
38-
.init_with_sampling_interval(algorithm_type, sampling_interval);
34+
.init_with_sampling_interval(self.state.algorithm_type, sampling_interval);
3935
}
4036

4137
/// Calculate the gas index value from the raw sensor value.

0 commit comments

Comments
 (0)