Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm one of the maintainers of the package for diskonaut in Fedora. I noticed that its dependencies have started to get quite outdated - it's pulling in a lot of old versions or crates that have been obsoleted long ago. So I tried my hand at updating it :)
Changes are split into separate commits so they're hopefully easier to review. Each crate update only required small code changes, if at all:
The
KeyEvent
struct added two more members, which don't seem to be too useful here, so I ignored them in most cases, and set them to reasonable (I hope) defaults in the test code. tui v0.19 is the last release of tui before it was obsoleted by ratatui.Layout::split
returns anRc<[]>
instead of aVec
, but a simple.to_vec()
solved that problem. And theBackend
trait added a newwindow_size
method, for which I added an implementation that returns a window with 80 columns and 24 lines (the default terminal size) and 0x0 pixels (the default for terminals that don't support this functionality).The
ratatui::Cell.symbol
struct member was made private, but could be replaced by calling theCell.symbol()
method.I didn't update this all the way to ratatui v0.28, because v0.26 matches the version of ratatui that we currently ship in Fedora. From what I can tell, updating from 0.26 to 0.28 and bumping crossterm from 0.27 to 0.28 accordingly should be straightforward.
The RayonDefaultPool now takes an argument, for which I added the default value (timeout of 1 second, according to the jwalk documentation).
unicode-width v0.2: no code changes.
nix v0.29: very small changes necessary.
Some functionality that was previously available in the
default
feature set of nix is now hidden behind theuser
feature, which I enabled.insta v1: no changes necessary.
structopt v0.3 -> clap v4: small code changes necessary.
I changed the import for the derive macro from
structopt::Structopt
toclap::Parser
, updated the attributes from#[structopt(...)]
to#[clap(...)]
, and replacedOpt::from_args()
withOpt::parse()
.I tried to verify that the behaviour of running diskonaut was unchanged and all tests all passed after each individual commit, and as far as I can tell, printed output and behaviour are unaffected, other than slightly differently formatted and ✨ stylized ✨ help output courtesy of clap v4.
I didn't make any formatting changes or fix rustc / clippy lints along the way to avoid making the PR harder to review.