Skip to content

Commit f1d83ff

Browse files
author
Nate Mara
committed
Fix some documentation
Some of the docstrings implied that the temperature_celdius, and pressure_kpa functions returned std::Options, when they really return std::Results.
1 parent 62a5ff9 commit f1d83ff

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/sensors/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ pub trait Thermometer {
3737

3838
/// Get a temperature from the sensor in degrees celsius
3939
///
40-
/// Returns Some(temperature) if available, otherwise returns
41-
/// None
40+
/// Returns `Ok(temperature)` if available, otherwise returns `Err(Self::Error)`
4241
fn temperature_celsius(&mut self) -> Result<f32, Self::Error>;
4342
}
4443

@@ -48,8 +47,7 @@ pub trait Barometer {
4847

4948
/// Get a pressure reading from the sensor in kPa
5049
///
51-
/// Returns Some(temperature) if avialable, otherwise returns
52-
/// None
50+
/// Returns `Ok(temperature)` if avialable, otherwise returns `Err(Self::Error)`
5351
fn pressure_kpa(&mut self) -> Result<f32, Self::Error>;
5452
}
5553

0 commit comments

Comments
 (0)