Hi there, I've encountered a strange syntax
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
pub fn is_control(self) -> bool {
unicode::Cc(self)
}
the Cc
is confusing to me, it refers to module cc
's method lookup
, but I've got no idea how it works
#[rustfmt::skip]
pub mod cc {
static SHORT_OFFSET_RUNS: [u32; 1] = [
1114272,
];
static OFFSETS: [u8; 5] = [
0, 32, 95, 33, 0,
];
pub fn lookup(c: char) -> bool {
super::skip_search(
c as u32,
&SHORT_OFFSET_RUNS,
&OFFSETS,
)
}
}