MCPcopy Create free account
hub / github.com/argumentcomputer/ix / pretty

Method pretty

crates/common/src/env.rs:237–257  ·  view source on GitHub ↗

Returns a dot-separated human-readable representation of this name.

(&self)

Source from the content-addressed store, hash-verified

235
236 /// Returns a dot-separated human-readable representation of this name.
237 pub fn pretty(&self) -> String {
238 let mut components = Vec::new();
239 let mut current = self;
240
241 loop {
242 match current.as_data() {
243 NameData::Anonymous(_) => break,
244 NameData::Str(pre, s, _) => {
245 components.push(s.as_str().to_owned());
246 current = pre;
247 },
248 NameData::Num(pre, n, _) => {
249 components.push(n.0.to_string());
250 current = pre;
251 },
252 }
253 }
254
255 components.reverse();
256 components.join(".")
257 }
258}
259
260impl StdHash for Name {

Callers 15

decompile_projectionFunction · 0.80
decompile_constFunction · 0.80
const_aux_fieldsFunction · 0.80
roundtrip_blockFunction · 0.80
print_rec_comparisonFunction · 0.80
check_decompileFunction · 0.80
egress_muts_blockFunction · 0.80
egress_standaloneFunction · 0.80
compile_univFunction · 0.80
collect_expr_tablesFunction · 0.80
compile_exprFunction · 0.80
mk_indcFunction · 0.80

Calls 3

as_dataMethod · 0.80
pushMethod · 0.80
joinMethod · 0.80

Tested by 1