spinoso_string/case_folding.rs
1/// Tracks whether a case-folding operation changed any bytes.
2#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3pub enum CaseFoldingEffect {
4 /// No bytes have changed so far.
5 Unchanged,
6 /// We have changed at least one byte.
7 Modified,
8}
9
10impl CaseFoldingEffect {
11 /// Returns `true` if at least one byte was changed.
12 #[must_use]
13 pub const fn changed(&self) -> bool {
14 matches!(self, Self::Modified)
15 }
16}