Skip to content

main.rs:1008: validate_config_for_doctor takes &Option<PathBuf> — should be Option<&PathBuf> #572

@EffortlessSteven

Description

@EffortlessSteven

clippy::ptr_arg lint flags this in main.rs:1008:

fn validate_config_for_doctor(config_path: &Option<PathBuf>, explicit_config: bool) -> bool {

warning: it is more idiomatic to use `Option<&T>` instead of `&Option`

`&Option` is an unnecessary indirection — it forces callers to wrap a reference in `Some(&path)` rather than simply passing `Some(&path)` directly. There are no uses in the codebase where `&Option` is needed over `Option<&PathBuf>`.

Fix: Change the parameter type to `Option<&PathBuf>` and update all call sites accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    conveyor/gate-verifiedConveyor gate-verified — managed by hermesconveyor/mode-fullConveyor mode-full — managed by hermes

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions