Skip to content

Audit and apply pub(crate) visibility to internal validate_* helper functions #86

@elycruz

Description

@elycruz

Summary

Several validate_* helper functions (e.g., validate_str, validate_len, validate_scalar, validate_step, etc.) in the walrs_validation crate are currently pub fn. If these are internal implementation details and not part of the public API, they should be scoped to pub(crate) to reduce the public surface area and prevent unintended external usage.

Affected Files

  • crates/validation/src/rule_impls/string.rsvalidate_str, validate_str_all, validate_str_option, validate_str_option_all
  • crates/validation/src/rule_impls/length.rsvalidate_len, validate_len_all, validate_option_len
  • crates/validation/src/rule_impls/scalar.rsvalidate_scalar, validate_scalar_all, validate_scalar_option, validate_scalar_option_all
  • crates/validation/src/rule_impls/steppable.rsvalidate_step, validate_step_all, validate_option_step, validate_option_step_all

Tasks

  • Audit each pub fn validate_* function to determine whether it is used outside the crate.
  • Change visibility from pub fn to pub(crate) fn for functions that are only used internally.
  • Verify the crate and dependent crates still compile after changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions