Skip to main content

normalize_guard

Function normalize_guard 

Source
pub fn normalize_guard(guard: &str) -> &str
Expand description

Normalise a guard name for comparison.

Strips language-specific prefixes that refer to the same object:

  • self.mumu (Rust / Python)
  • this->mumu (C++ member)
  • this.mumu (Go/Java style)
  • Leading & / * dereference operators

Only the outermost layer of each prefix is stripped so that deeply qualified names (e.g. self.inner.mu) still compare differently from self.outer.mu.