EpicCash / epic

Blockchain Node Server with integrated Stratum Mining Server
https://epiccash.com
Apache License 2.0
25 stars 36 forks source link

Resolve ScrollBase deprecation in cursive crate #107

Closed who-biz closed 1 year ago

who-biz commented 1 year ago

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.

who-biz commented 1 year ago

Changes were pulled from here, for reference: https://github.com/mimblewimble/grin/pull/3547