- // We should only get here if the single contained has an inner
- assert!(self.c_type_has_inner(single_contained.unwrap()));
- Some(("Vec::new(); for mut item in ", vec![(format!(".drain(..) {{ local_{}.push(", var_name), "*item".to_string())], "); }", ContainerPrefixLocation::PerConv))
+ if is_ref {
+ // We should only get here if the single contained has an inner
+ assert!(self.c_type_has_inner(single_contained.unwrap()));
+ }
+ Some(("Vec::new(); for mut item in ", vec![(format!(".drain(..) {{ local_{}.push(", var_name), "item".to_string())], "); }", ContainerPrefixLocation::PerConv))