Description
In Ratatui, we format using nightly to take advantage of a few nightly only configuration settings.
Today, in addition to a bunch of changes that seem to make the code easier to read, I noticed that rustfmt started removing doc comments from the source code, which is really odd.
A PR that shows the problematic changes:
https://github.com/ratatui-org/ratatui/pull/645/files#diff-628d0c731b37af0b4b3e76450a4b5fa9efc05880d9038403ee7663f171f07f2a
Specifically the first change is in src/backend/crossterm.rs, but there are a few similar changes.
I've run rustup update which got:
nightly-aarch64-apple-darwin updated - rustc 1.76.0-nightly (37b2813a7 2023-11-24) (from rustc 1.76.0-nightly (1e9dda77b 2023-11-22))
Repro steps in case that's not enough:
- gh repo clone ratatui-org/ratatui
- cargo +nightly fmt
and
rustfmt 1.7.0-nightly (37b2813a 2023-11-24)
Diff:
impl<W> CrosstermBackend<W>
where
W: Write,
{
/// Creates a new `CrosstermBackend` with the given writer.
- ///
- /// # Example
- ///
- /// ```rust,no_run
- /// # use std::io::stdout;
- /// # use ratatui::prelude::*;
- /// let backend = CrosstermBackend::new(stdout());
- /// ```
pub fn new(writer: W) -> CrosstermBackend<W> {
CrosstermBackend { writer }
}
}