We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ec54153 + 16edec3 commit 02e1d7eCopy full SHA for 02e1d7e
src/fs/file.rs
@@ -742,7 +742,10 @@ impl LockGuard<State> {
742
if n > 0 {
743
// Seek `n` bytes backwards. This call should not block because it only changes
744
// the internal offset into the file and doesn't touch the actual file on disk.
745
- (&*self.file).seek(SeekFrom::Current(-(n as i64)))?;
+ //
746
+ // We ignore errors here because special files like `/dev/random` are not
747
+ // seekable.
748
+ let _ = (&*self.file).seek(SeekFrom::Current(-(n as i64)));
749
}
750
751
// Switch to idle mode.
0 commit comments