MCPcopy Index your code
hub / github.com/cloud-hypervisor/cloud-hypervisor / join_strs

Function join_strs

cloud-hypervisor/src/bin/ch-remote.rs:1221–1227  ·  view source on GitHub ↗
(mut acc: String, next: String)

Source from the content-addressed store, hash-verified

1219 // Helper to join strings with a newline.
1220 #[allow(clippy::needless_pass_by_value)]
1221 fn join_strs(mut acc: String, next: String) -> String {
1222 if !acc.is_empty() {
1223 acc.push('\n');
1224 }
1225 acc.push_str(&next);
1226 acc
1227 }
1228
1229 // This function helps to modify the Display representation of remote
1230 // API failures so that it aligns with the regular output of error

Callers

nothing calls this directly

Calls 2

is_emptyMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected