Skip to content

add #[must_use] to all pub functions #47

@marcoieni

Description

@marcoieni

docs here.

Calling config_dir() and all the other public functions without reading the return values makes no sense (because they have no side effects) and is a user error for sure.

By adding this macro, the user will get a warning if it calls these functions without reading the return value.

Example here

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementE-easyAn easy issue: a good way to start contributing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions