Enrico Borba

Results 62 comments of Enrico Borba

```dockerfile FROM python:3.8-buster RUN apt-get -y update && apt-get -y upgrade RUN apt-get -y install curl unzip # ---------- dependencies ---------- WORKDIR /dependencies # scancode: https://github.com/nexB/scancode-toolkit ARG SCANCODE_VERSION=31.2.6 RUN apt-get...

> Exposing a mutable reference to the writer seems like it would be problematic as the terminal implementation assumes a lot about the state of the buffer. But isn't this...

I can't read the `&mut [u8]` since the backends take ownership: ```rust let terminal = Terminal::new(CrosstermBackend::new(Vec::::new())); let ui = |frame| { ... }; terminal.draw(ui); let crossterm_backend = terminal.backend(); let buffer...

The problem with that example is that I can't reuse `buffer` after reading from `writer`. Specifically I'm looking to alternate between reading and writing. For example: ```rust use std::io::Write; use...

Perhaps I am missing something. I am still unsure I understand the cons of this PR, especially given its size. The example workarounds require more code, synchronization, and/or data duplication....

Also, why is `backend_mut` okay but `writer_mut` not?

It sounds like we're in agreement to put this (and perhaps `backend_mut`) behind a flag. Can I proceed with this? However, surely allowing read access does not affect _any_ assumptions...

Also, I personally do not feel that `backend_mut` nor `writer_mut` are footguns. Searching for `backend_mut` on the [`tui-rs` repo](https://github.com/fdehau/tui-rs) and on this repo shows no results (except for this issue),...

I think that it's important to note that even though [`BufWriter`](https://doc.rust-lang.org/std/io/struct.BufWriter.html) makes assumptions about its inner writer, it still exposes the inner writer without any feature flag or `unsafe`. I...