mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-18 10:07:28 +00:00
Less opinionated DynWriteLock
Allows easier reuse by future variants of UiOutputPair.
This commit is contained in:
parent
c046e1c845
commit
d188240939
1 changed files with 2 additions and 2 deletions
|
@ -239,9 +239,9 @@ enum UiOutputPair {
|
|||
}
|
||||
|
||||
/// Wrapper to implement `Write` for locked `Box<dyn Write>`.
|
||||
struct DynWriteLock<'a, 'output>(MutexGuard<'a, Box<dyn Write + 'output>>);
|
||||
struct DynWriteLock<'a, T>(MutexGuard<'a, T>);
|
||||
|
||||
impl Write for DynWriteLock<'_, '_> {
|
||||
impl<T: Write> Write for DynWriteLock<'_, T> {
|
||||
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||
self.0.write(buf)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue