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

Method resolve_body

atomic-cli/src/commands/intent/update.rs:66–79  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

64
65impl IntentUpdate {
66 fn resolve_body(&self) -> CliResult<Option<String>> {
67 if let Some(ref body) = self.body {
68 return Ok(Some(body.clone()));
69 }
70 if self.body_stdin {
71 use std::io::Read;
72 let mut content = String::new();
73 std::io::stdin()
74 .read_to_string(&mut content)
75 .map_err(CliError::Io)?;
76 return Ok(Some(content));
77 }
78 Ok(None)
79 }
80}
81
82impl Command for IntentUpdate {

Callers 1

runMethod · 0.45

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected