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

Function parse_changelist

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

Parse a changelist response into entries.

(text: &str)

Source from the content-addressed store, hash-verified

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

Calls 4

parseFunction · 0.85
linesMethod · 0.45
is_emptyMethod · 0.45
pushMethod · 0.45