Skip to content

Commit 3c50199

Browse files
committed
Avoid panic in Itertools::format_with
When tracing is configured with multiple output layers, the argument to `tracing::debug!` may be evaluated multiple times. Since `Itertools::format_with` panics if `fmt` is called on it more than once, use `to_string` to materialize the value into something safe to format multiple times.
1 parent ed7b764 commit 3c50199

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/solver/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ impl<D: DependencyProvider, RT: AsyncRuntime> Solver<D, RT> {
572572
self.clauses.kinds[derived_from.to_usize()]
573573
.display(&self.variable_map, self.provider()),
574574
)))
575+
.to_string()
575576
);
576577
tracing::debug!("====");
577578

0 commit comments

Comments
 (0)