Skip to content

Commit

Permalink
More lints
Browse files Browse the repository at this point in the history
  • Loading branch information
svartalf committed Feb 8, 2020
1 parent a4ca991 commit 6dcd588
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions heim-disk/src/sys/windows/partitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub struct Partition {
}

impl Partition {
#[allow(clippy::option_as_ref_deref)] // >= 1.40.0
pub fn device(&self) -> Option<&OsStr> {
self.volume.as_ref().map(OsString::as_os_str)
}
Expand Down
3 changes: 2 additions & 1 deletion heim-sensors/src/temperatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ impl TemperatureSensor {
}

/// Returns sensor label.
#[allow(clippy::option_as_ref_deref)] // >= 1.40.0
pub fn label(&self) -> Option<&str> {
self.label.as_deref()
self.label.as_ref().map(|s| s.as_str())
}

/// Returns current temperature reported by sensor.
Expand Down

0 comments on commit 6dcd588

Please sign in to comment.