MCPcopy Create free account
hub / github.com/hashintel/hash / remove_builtin_messages

Function remove_builtin_messages

libs/error-stack/tests/common.rs:238–253  ·  view source on GitHub ↗
(
    messages: impl IntoIterator<Item = S>,
)

Source from the content-addressed store, hash-verified

236}
237
238pub fn remove_builtin_messages<S: AsRef<str>>(
239 messages: impl IntoIterator<Item = S>,
240) -> Vec<String> {
241 messages
242 .into_iter()
243 .filter_map(|message| {
244 let message = message.as_ref();
245 #[expect(clippy::if_then_some_else_none, reason = "complexity + readability")]
246 if message != "Location" && message != "Backtrace" && message != "SpanTrace" {
247 Some(message.to_owned())
248 } else {
249 None
250 }
251 })
252 .collect()
253}
254
255pub fn remove_builtin_frames<E>(report: &Report<E>) -> impl Iterator<Item = &Frame> {
256 report.frames().filter(|frame| {

Callers

nothing calls this directly

Calls 4

collectMethod · 0.80
into_iterMethod · 0.45
as_refMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected