MCPcopy Create free account
hub / github.com/RustCrypto/utils / visit_path

Method visit_path

zeroize_derive/src/lib.rs:148–162  ·  view source on GitHub ↗
(&mut self, path: &'ast syn::Path)

Source from the content-addressed store, hash-verified

146
147impl<'ast> Visit<'ast> for BoundAccumulator<'ast> {
148 fn visit_path(&mut self, path: &'ast syn::Path) {
149 if path.segments.len() != 1 {
150 return;
151 }
152
153 if let Some(segment) = path.segments.first() {
154 for param in &self.generics.params {
155 if let syn::GenericParam::Type(type_param) = param {
156 if type_param.ident == segment.ident && !self.params.contains(&segment.ident) {
157 self.params.push(type_param.ident.clone());
158 }
159 }
160 }
161 }
162 }
163}
164
165impl ZeroizeAttrs {

Callers

nothing calls this directly

Calls 2

lenMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected