(
n: usize,
)
| 45 | } |
| 46 | |
| 47 | fn struct_array_values( |
| 48 | n: usize, |
| 49 | ) -> ( |
| 50 | &'static str, |
| 51 | Vec<Option<&'static str>>, |
| 52 | &'static str, |
| 53 | Vec<Option<i32>>, |
| 54 | ) { |
| 55 | let mut strings: Vec<Option<&str>> = Vec::with_capacity(n); |
| 56 | let mut ints: Vec<Option<i32>> = Vec::with_capacity(n); |
| 57 | for _ in 0..n / 4 { |
| 58 | strings.extend_from_slice(&[Some("joe"), None, None, Some("mark")]); |
| 59 | ints.extend_from_slice(&[Some(1), Some(2), None, Some(4)]); |
| 60 | } |
| 61 | ("f1", strings, "f2", ints) |
| 62 | } |
| 63 | |
| 64 | fn struct_array_from_vec( |
| 65 | field1: &str, |
no test coverage detected