Parse a batch of ILP lines. Skips empty lines and comments.
(input: &str)
| 112 | |
| 113 | /// Parse a batch of ILP lines. Skips empty lines and comments. |
| 114 | pub fn parse_batch(input: &str) -> Vec<Result<IlpLine<'_>, IlpError>> { |
| 115 | input |
| 116 | .lines() |
| 117 | .filter(|l| !l.trim().is_empty() && !l.trim().starts_with('#')) |
| 118 | .map(parse_line) |
| 119 | .collect() |
| 120 | } |
| 121 | |
| 122 | fn parse_measurement_tags(s: &str) -> Result<MeasurementTags<'_>, IlpError> { |
| 123 | let mut parts = s.splitn(2, ','); |