Skip to content

dead_code: config/src/kdl.rs -> NodeExt::get_string(...) never used #123

@peter-lyons-kehl

Description

@peter-lyons-kehl

Thank you for the scheduler.

   Compiling system76-scheduler-config v2.0.2 (/var/tmp/pamac-build-pkehl/system76-scheduler-git/src/system76-scheduler/config)
warning: method `get_string` is never used
  --> config/src/kdl.rs:21:8
   |
15 | pub trait NodeExt {
   |           ------- method in this trait
...
21 |     fn get_string(&self, index: impl Into<NodeKey>) -> Option<&str>;
   |        ^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: `system76-scheduler-config` (lib) generated 1 warning
   Compiling tracing-subscriber v0.3.16
...

grep -r get_string config data execsnoop/ daemon/ debian/ pipewire/
config/src/kdl.rs:    fn get_string(&self, index: impl Into<NodeKey>) -> Option<&str>;
config/src/kdl.rs:    fn get_string(&self, index: impl Into<NodeKey>) -> Option<&str> {

As per config/src/lib.rs, kdl module is crate-public only: pub(crate) mod kdl;.

Should it be

  • removed, or
  • marked with #[allow(dead_code)]?

I'm willing to create a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions