MCPcopy Create free account
hub / github.com/bootc-dev/bootc / to_string_pretty

Method to_string_pretty

crates/utils/src/command.rs:200–211  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

198 }
199
200 fn to_string_pretty(&self) -> String {
201 std::iter::once(self.get_program())
202 .chain(self.get_args())
203 .fold(String::new(), |mut acc, element| {
204 if !acc.is_empty() {
205 acc.push(' ');
206 }
207 // SAFETY: Writes to string can't fail
208 write!(&mut acc, "{}", crate::PathQuotedDisplay::new(&element)).unwrap();
209 acc
210 })
211 }
212}
213
214/// Helpers intended for [`tokio::process::Command`].

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected