(&self, f: &mut fmt::Formatter<'_>)
| 115 | |
| 116 | impl fmt::Display for LockError { |
| 117 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 118 | write!(f, "failed to lock {}", self.path.display())?; |
| 119 | if let Some(contents) = &self.existing_contents { |
| 120 | write!(f, " (existing contents: {:?})", contents)?; |
| 121 | } |
| 122 | Ok(()) |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | impl StdError for LockError { |