Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ mask
Function
mask
crates/ruff_python_parser/src/token_set.rs:33–35 ·
view source on GitHub ↗
(kind: TokenKind)
Source
from the content-addressed store, hash-verified
31
}
32
33
const fn mask(kind: TokenKind) -> u128 {
34
1u128 << (kind as usize)
35
}
36
37
impl<const N: usize> From<[TokenKind; N]> for TokenSet {
38
fn from(kinds: [TokenKind; N]) -> Self {
Callers
3
new
Method · 0.85
remove
Method · 0.85
contains
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected