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

Function expect_count

libs/error-stack/tests/common.rs:275–287  ·  view source on GitHub ↗
(mut count: usize)

Source from the content-addressed store, hash-verified

273 expect(clippy::missing_const_for_fn, unused_mut)
274)]
275pub fn expect_count(mut count: usize) -> usize {
276 #[cfg(feature = "backtrace")]
277 if supports_backtrace() {
278 count += 1;
279 }
280
281 #[cfg(feature = "spantrace")]
282 if supports_spantrace() {
283 count += 1;
284 }
285
286 count + 1
287}
288
289/// Helper macro used to match against the kinds.
290///

Callers 2

push_appendFunction · 0.85
pushFunction · 0.85

Calls 2

supports_backtraceFunction · 0.85
supports_spantraceFunction · 0.85

Tested by

no test coverage detected