MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / get_name

Function get_name

crates/rustc_codegen_spirv/src/linker/mod.rs:145–150  ·  view source on GitHub ↗
(names: &FxHashMap<Word, &'a str>, id: Word)

Source from the content-addressed store, hash-verified

143}
144
145fn get_name<'a>(names: &FxHashMap<Word, &'a str>, id: Word) -> Cow<'a, str> {
146 names.get(&id).map_or_else(
147 || Cow::Owned(format!("Unnamed function ID %{id}")),
148 |&s| Cow::Borrowed(s),
149 )
150}
151
152pub fn link(
153 sess: &Session,

Callers 3

visitFunction · 0.85
visitFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected