()
| 186 | ]; |
| 187 | |
| 188 | fn all_commands_info() -> RecordBatch { |
| 189 | let schema = Arc::new(Schema::new(vec![ |
| 190 | Field::new("Command", DataType::Utf8, false), |
| 191 | Field::new("Description", DataType::Utf8, false), |
| 192 | ])); |
| 193 | let (names, description): (Vec<&str>, Vec<&str>) = ALL_COMMANDS |
| 194 | .into_iter() |
| 195 | .map(|c| c.get_name_and_description()) |
| 196 | .unzip(); |
| 197 | RecordBatch::try_new( |
| 198 | schema, |
| 199 | [names, description] |
| 200 | .into_iter() |
| 201 | .map(|i| Arc::new(StringArray::from(i)) as ArrayRef) |
| 202 | .collect::<Vec<_>>(), |
| 203 | ) |
| 204 | .expect("This should not fail") |
| 205 | } |
| 206 | |
| 207 | impl FromStr for Command { |
| 208 | type Err = (); |
no test coverage detected
searching dependent graphs…