Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve ScrollBase deprecation in cursive crate #107

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

who-biz
Copy link
Contributor

@who-biz who-biz commented Sep 27, 2023

  • Replaces table.rs with cursive_table_view dependency
  • Silences several warnings related to cursive::view::ScrollBase, in favor of cursive::view::scroll module
  • Updates Cargo.toml/Cargo.lock
  • Also removes unused code resulting from these changes, specifically: let backend = cursive::backends::curses::pan::Backend::init().unwrap();, which appears (now or previously, unsure) unnecessary
  • Existing functionality is preserved in full

Resolves existing warnings below:

warning: use of deprecated struct `cursive::view::ScrollBase`: `ScrollBase` is being deprecated in favor of the view::scroll module.
  --> src/bin/tui/table.rs:70:21
   |
70 | use cursive::view::{ScrollBase, View};
   |                     ^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated struct `cursive::view::ScrollBase`: `ScrollBase` is being deprecated in favor of the view::scroll module.
   --> src/bin/tui/table.rs:150:14
    |
150 |     scrollbase: ScrollBase,
    |                 ^^^^^^^^^^

warning: use of deprecated struct `cursive::view::ScrollBase`: `ScrollBase` is being deprecated in favor of the view::scroll module.
   --> src/bin/tui/table.rs:176:16
    |
176 |             scrollbase: ScrollBase::new(),
    |                         ^^^^^^^^^^

As well as a newly generated one (I think -- maybe it was present before, unsure):

warning: unused variable: `backend`
  --> src/bin/tui/ui.rs:68:7
   |
68 |         let backend = cursive::backends::curses::pan::Backend::init().unwrap();
   |             ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_backend`
   |
   = note: `#[warn(unused_variables)]` on by default

Regarding removal of Backend::init() above, server seems to run exactly the same with its removal. But, please test to ensure functionality is the same. I am not a TUI-based user.

- Replaces 'table.rs' with cursive_table_view dependency
- Silences several warnings related to cursive::ScrollBase, in favor of cursive::view::scroll module
- Updates Cargo.toml/Cargo.lock
- Also removes unused code resulting from these changes, specifically: 'let backend = cursive::backends::curses::pan::Backend::init().unwrap();', which appears (now or previously, unsure) unnecessary
- Existing functionality is preserved
@who-biz
Copy link
Contributor Author

who-biz commented Sep 28, 2023

Changes were pulled from here, for reference: mimblewimble/grin#3547

@who-biz who-biz merged commit 73d19b5 into EpicCash:master Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants