Warning: methods add_session_hook and remove_session_hook are never used #1847

Closed
opened 2026-02-21 00:06:24 -05:00 by deekerman · 1 comment
Owner

Originally created by @paulmenzel on GitHub (Jun 12, 2023).

Bug Description

Building rustdesk with Flutter, the warning below is shown.

$ rustc --version
rustc 1.70.0 (90c541806 2023-05-31) (built from a source tarball)
$ git log --oneline --no-decorate -1
4e00945a Merge pull request #4587 from rustdesk/revert-4586-msgbox
$ cargo build --features flutter --release
   Compiling rustdesk v1.2.0 (/scratch/local2/pmenzel/rustdesk)
warning: methods `add_session_hook` and `remove_session_hook` are never used
   --> src/flutter.rs:298:19
    |
251 | impl FlutterHandler {
    | ------------------- methods in this implementation
...
298 |     pub(crate) fn add_session_hook(&self, key: String, hook: SessionHook) -> bool {
    |                   ^^^^^^^^^^^^^^^^
...
309 |     pub(crate) fn remove_session_hook(&self, key: &String) -> bool {
    |                   ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: `rustdesk` (lib) generated 1 warning
    Finished release [optimized] target(s) in 10m 42s

How to Reproduce

Build rustdesk.

Expected Behavior

No warnings should be shown.

Operating system(s) on local side and remote side

GNU/Linux with Rust 1.70.0

RustDesk Version(s) on local side and remote side

4e00945a Merge pull request #4587 from rustdesk/revert-4586-msgbox

Screenshots

Build issue.

Additional Context

No response

Originally created by @paulmenzel on GitHub (Jun 12, 2023). ### Bug Description Building rustdesk with Flutter, the warning below is shown. ``` $ rustc --version rustc 1.70.0 (90c541806 2023-05-31) (built from a source tarball) $ git log --oneline --no-decorate -1 4e00945a Merge pull request #4587 from rustdesk/revert-4586-msgbox $ cargo build --features flutter --release Compiling rustdesk v1.2.0 (/scratch/local2/pmenzel/rustdesk) warning: methods `add_session_hook` and `remove_session_hook` are never used --> src/flutter.rs:298:19 | 251 | impl FlutterHandler { | ------------------- methods in this implementation ... 298 | pub(crate) fn add_session_hook(&self, key: String, hook: SessionHook) -> bool { | ^^^^^^^^^^^^^^^^ ... 309 | pub(crate) fn remove_session_hook(&self, key: &String) -> bool { | ^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: `rustdesk` (lib) generated 1 warning Finished release [optimized] target(s) in 10m 42s ``` ### How to Reproduce Build rustdesk. ### Expected Behavior No warnings should be shown. ### Operating system(s) on local side and remote side GNU/Linux with Rust 1.70.0 ### RustDesk Version(s) on local side and remote side 4e00945a Merge pull request #4587 from rustdesk/revert-4586-msgbox ### Screenshots Build issue. ### Additional Context _No response_
deekerman 2026-02-21 00:06:24 -05:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@rustdesk commented on GitHub (Jun 12, 2023):

#763

@rustdesk commented on GitHub (Jun 12, 2023): #763
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rustdesk-rustdesk#1847
No description provided.