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

Function match_last_ty

flow-derive/src/utils.rs:45–55  ·  view source on GitHub ↗
(ty: &syn::Type, wrapper: &str)

Source from the content-addressed store, hash-verified

43}
44
45pub fn match_last_ty(ty: &syn::Type, wrapper: &str) -> bool {
46 match ty {
47 syn::Type::Path(ref p) => p
48 .path
49 .segments
50 .last()
51 .map(|seg| seg.ident == wrapper)
52 .unwrap_or(false),
53 _ => false,
54 }
55}
56
57pub fn last_inner_ty(ty: &syn::Type) -> Option<&syn::Type> {
58 if let syn::Type::Path(ref p) = ty {

Callers 8

extract_portsFunction · 0.85
parser_expandFunction · 0.85
send_empty_fFunction · 0.85
min_empty_n_fFunction · 0.85
set_fFunction · 0.85
set_dyn_fFunction · 0.85
close_fFunction · 0.85
is_close_fFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected