Skip to content

Commit 752911d

Browse files
Fix clippy warnings
1 parent bd7502b commit 752911d

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/fs.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,10 @@ impl<'a, 'b, Storage: driver::Storage> File<'a, 'b, Storage> {
719719
io::result_from(return_code as usize, return_code)
720720
}
721721

722+
pub fn is_empty(&self) -> Result<bool> {
723+
self.len().map(|l| l == 0)
724+
}
725+
722726
/// Truncates or extends the underlying file, updating the size of this file to become size.
723727
///
724728
/// If the size is less than the current file's size, then the file will be shrunk. If it is

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#![cfg_attr(not(test), no_std)]
2+
// FIXME
3+
#![allow(clippy::missing_safety_doc)]
24

35
/*!
46

src/path.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ unsafe fn strlen(mut s: *const c_char) -> size_t {
202202
n
203203
}
204204

205+
impl Default for PathBuf {
206+
fn default() -> Self {
207+
Self::new()
208+
}
209+
}
210+
205211
impl PathBuf {
206212
pub fn new() -> Self {
207213
Self {

0 commit comments

Comments
 (0)