MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / parse_changelist

Function parse_changelist

atomic-remote/src/http/mod.rs:295–312  ·  view source on GitHub ↗

Parse a changelist response into entries.

(text: &str)

Source from the content-addressed store, hash-verified

293
294/// Parse a changelist response into entries.
295pub(crate) fn parse_changelist(text: &str) -> RemoteResult<Vec<ChangelistEntry>> {
296 let mut entries = Vec::new();
297
298 for line in text.lines() {
299 let line = line.trim();
300 if line.is_empty() {
301 continue;
302 }
303
304 let entry = ChangelistEntry::parse(line).map_err(|e| {
305 RemoteError::protocol(format!("Failed to parse changelist entry: {}", e))
306 })?;
307
308 entries.push(entry);
309 }
310
311 Ok(entries)
312}

Calls 4

parseFunction · 0.50
linesMethod · 0.45
is_emptyMethod · 0.45
pushMethod · 0.45