Skip to content

Commit cbb8666

Browse files
committed
Implement error::Error for TryLockError
1 parent 2e84385 commit cbb8666

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/std/src/fs.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
mod tests;
2222

2323
use crate::ffi::OsString;
24-
use crate::fmt;
2524
use crate::io::{self, BorrowedCursor, IoSlice, IoSliceMut, Read, Seek, SeekFrom, Write};
2625
use crate::path::{Path, PathBuf};
2726
use crate::sealed::Sealed;
2827
use crate::sync::Arc;
2928
use crate::sys::fs as fs_imp;
3029
use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
3130
use crate::time::SystemTime;
31+
use crate::{error, fmt};
3232

3333
/// An object providing access to an open file on the filesystem.
3434
///
@@ -368,6 +368,9 @@ pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result
368368
inner(path.as_ref(), contents.as_ref())
369369
}
370370

371+
#[unstable(feature = "file_lock", issue = "130994")]
372+
impl error::Error for TryLockError {}
373+
371374
#[unstable(feature = "file_lock", issue = "130994")]
372375
impl fmt::Debug for TryLockError {
373376
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

0 commit comments

Comments
 (0)