diff options
| author | Christopher Berner <me@cberner.com> | 2025-04-06 08:39:10 -0700 |
|---|---|---|
| committer | Christopher Berner <me@cberner.com> | 2025-05-01 20:39:05 -0700 |
| commit | 1d11ee2a5b84693ac37173b4515e5411e76cad82 (patch) | |
| tree | 95bc7e8ba7b6b68f51232d95ac57c4937956d5f7 | |
| parent | 042a556d8d0247361ed97e5d9217bb477c487be3 (diff) | |
| download | rust-1d11ee2a5b84693ac37173b4515e5411e76cad82.tar.gz rust-1d11ee2a5b84693ac37173b4515e5411e76cad82.zip | |
Implement error::Error for TryLockError
| -rw-r--r-- | library/std/src/fs.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 27f60ffb00c..a1d4354d4fd 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -21,7 +21,6 @@ mod tests; use crate::ffi::OsString; -use crate::fmt; use crate::io::{self, BorrowedCursor, IoSlice, IoSliceMut, Read, Seek, SeekFrom, Write}; use crate::path::{Path, PathBuf}; use crate::sealed::Sealed; @@ -29,6 +28,7 @@ use crate::sync::Arc; use crate::sys::fs as fs_imp; use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner}; use crate::time::SystemTime; +use crate::{error, fmt}; /// An object providing access to an open file on the filesystem. /// @@ -369,6 +369,9 @@ pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result } #[unstable(feature = "file_lock", issue = "130994")] +impl error::Error for TryLockError {} + +#[unstable(feature = "file_lock", issue = "130994")] impl fmt::Debug for TryLockError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { |
