MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / close_f

Function close_f

flow-derive/src/node.rs:83–91  ·  view source on GitHub ↗
((_, ident, ty): IterArgs)

Source from the content-addressed store, hash-verified

81 }
82 }
83 fn close_f((_, ident, ty): IterArgs) -> TokenStream {
84 if match_last_ty(ty, "Vec") || match_last_ty(ty, "HashMap") {
85 quote_spanned! {ident.span()=>
86 self.#ident.clear();
87 }
88 } else {
89 quote!()
90 }
91 }
92 fn is_close_f((_, ident, ty): IterArgs) -> TokenStream {
93 if match_last_ty(ty, "Vec") {
94 quote_spanned! {ident.span()=>

Callers

nothing calls this directly

Calls 1

match_last_tyFunction · 0.85

Tested by

no test coverage detected