Skip to content

TigerStyle: missing key-empty preconditions on string ops #7

@nerdsane

Description

@nerdsane

Context

Found during code review of bitmap implementation (commit e9be18b).

Problem

Most string command implementations in src/redis/executor/string_ops.rs lack debug_assert!(!key.is_empty()) entry preconditions. Only incr_by_impl (line 559) has one. For consistency, all public string ops should have it:

  • execute_get
  • execute_append
  • execute_getset
  • execute_strlen
  • execute_getrange
  • execute_setrange
  • execute_setbit / execute_getbit (bitmap_ops.rs)

Severity

Low — defensive assertion, not a runtime bug.

Found By

TigerStyle review agent (Issues 4, 12)

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