Skip to content

Commit 3faba45

Browse files
committed
update error messages and documentation
1 parent ece00f1 commit 3faba45

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

crates/prettytty/src/conn.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl Connection {
176176
#[inline]
177177
pub fn input(&self) -> Input {
178178
Input {
179-
scanner: self.scanner.lock().expect("mutex is not poisoned"),
179+
scanner: self.scanner.lock().expect("can't lock poisoned mutex"),
180180
}
181181
}
182182

@@ -187,7 +187,7 @@ impl Connection {
187187
#[inline]
188188
pub fn output(&self) -> Output {
189189
Output {
190-
writer: self.writer.lock().expect("mutex is not poisoned"),
190+
writer: self.writer.lock().expect("can't lock poisoned mutex"),
191191
}
192192
}
193193

crates/prettytty/src/sys/unix.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ impl RawConfig {
156156
}
157157

158158
/// Apply the options to create a new configuration.
159+
///
160+
/// If the options do not requires changes to the current configuration,
161+
/// this method return `None`.
159162
pub fn apply(&self, options: &Options) -> Option<Self> {
160163
let mut state = self.state;
161164

0 commit comments

Comments
 (0)