summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/errors.rs
diff options
context:
space:
mode:
authorMarcin Puc <5671049+tranzystorek-io@users.noreply.github.com>2021-12-07 11:24:42 +0100
committerGitHub <noreply@github.com>2021-12-07 10:24:42 +0000
commit56e85f87d6c365816cca71c496aa7e49709e0b11 (patch)
tree1dbc6db878e8da9544df9445d77d1cd665b9126b /zellij-utils/src/errors.rs
parentd34e6240101d246f02921cbc909dcd04f648203e (diff)
fix(style): various internal refactorings
Diffstat (limited to 'zellij-utils/src/errors.rs')
-rw-r--r--zellij-utils/src/errors.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs
index aeeed2030..d5407dd12 100644
--- a/zellij-utils/src/errors.rs
+++ b/zellij-utils/src/errors.rs
@@ -121,8 +121,8 @@ impl ErrorContext {
/// Adds a call to this [`ErrorContext`]'s call stack representation.
pub fn add_call(&mut self, call: ContextType) {
- for ctx in self.calls.iter_mut() {
- if *ctx == ContextType::Empty {
+ for ctx in &mut self.calls {
+ if let ContextType::Empty = ctx {
*ctx = call;
break;
}