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

Function line_with

atomic-cli/tests/it/git_shim_logging_test.rs:117–121  ·  view source on GitHub ↗

The first log line containing every needle.

(log: &'a str, needles: &[&str])

Source from the content-addressed store, hash-verified

115
116/// The first log line containing every needle.
117fn line_with<'a>(log: &'a str, needles: &[&str]) -> &'a str {
118 log.lines()
119 .find(|line| needles.iter().all(|needle| line.contains(needle)))
120 .unwrap_or_else(|| panic!("no line with {needles:?} in:\n{log}"))
121}
122
123/// A shim-enabled repository on `main`, then a commit on `feature` made
124/// through Git so its hooks run, reconciled into Atomic.

Calls 4

linesMethod · 0.45
allMethod · 0.45
iterMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected