From de87b2f89e87b6b3cbba6740e553b7d3c6f43a5e Mon Sep 17 00:00:00 2001 From: Jake Probst Date: Sun, 14 Jul 2019 00:40:56 -0700 Subject: [PATCH] why did I make these iterators? --- psopacket/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/psopacket/src/lib.rs b/psopacket/src/lib.rs index abb6174..c3dca3f 100644 --- a/psopacket/src/lib.rs +++ b/psopacket/src/lib.rs @@ -41,13 +41,13 @@ pub fn pso_packet(attr: TokenStream, item: TokenStream) -> TokenStream { dbg_write_vars.push(quote! { match std::str::from_utf8(&self.#ident) { Ok(v) => write!(f, " {}: {:?}\n", #ident_str, v).unwrap(), - Err(_) => write!(f, " {}: {:?}\n", #ident_str, self.#ident.iter()).unwrap() + Err(_) => write!(f, " {}: {:?}\n", #ident_str, self.#ident.to_vec()).unwrap() } }); } else { dbg_write_vars.push(quote! { - write!(f, " {}: {:?}\n", #ident_str, self.#ident.iter()).unwrap(); + write!(f, " {}: {:?}\n", #ident_str, self.#ident.to_vec()).unwrap(); }); } //dbg_write_vars.push(quote! {