MCPcopy Index your code
hub / github.com/RustPython/RustPython / find_by_name

Method find_by_name

crates/stdlib/src/ssl/oid.rs:122–131  ·  view source on GitHub ↗
(&self, name: &str)

Source from the content-addressed store, hash-verified

120 }
121
122 pub fn find_by_name(&self, name: &str) -> Option<&OidEntry> {
123 // Try short name first (exact match)
124 self.short_name_to_idx
125 .get(name)
126 .or_else(|| {
127 // Try long name (case-insensitive)
128 self.long_name_to_idx.get(&name.to_lowercase())
129 })
130 .map(|&idx| &self.entries[idx])
131 }
132}
133
134/// Global OID table

Callers 1

find_by_nameFunction · 0.80

Calls 3

to_lowercaseMethod · 0.80
mapMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected