Skip to content

Commit 75a0ccc

Browse files
fix(lifecycle): remove redundant registry closures
1 parent 93795be commit 75a0ccc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/tracedecay/lifecycle/registry.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl TraceDecay {
126126
{
127127
let cache = LAST_REGISTERED_DIGEST
128128
.lock()
129-
.unwrap_or_else(|e| e.into_inner());
129+
.unwrap_or_else(std::sync::PoisonError::into_inner);
130130
if registration_digest_matches(&cache, project_id, &digest) {
131131
return Ok(());
132132
}
@@ -138,7 +138,7 @@ impl TraceDecay {
138138
{
139139
let cache = LAST_REGISTERED_DIGEST
140140
.lock()
141-
.unwrap_or_else(|e| e.into_inner());
141+
.unwrap_or_else(std::sync::PoisonError::into_inner);
142142
if registration_digest_matches(&cache, project_id, &digest) {
143143
return Ok(());
144144
}
@@ -284,7 +284,7 @@ impl TraceDecay {
284284

285285
LAST_REGISTERED_DIGEST
286286
.lock()
287-
.unwrap_or_else(|e| e.into_inner())
287+
.unwrap_or_else(std::sync::PoisonError::into_inner)
288288
.insert(project_id.to_string(), digest);
289289
Ok(())
290290
}
@@ -366,7 +366,7 @@ mod tests {
366366
project_id: "proj-1".to_string(),
367367
canonical_root: PathBuf::from(canonical_root),
368368
git_common_dir: Some(PathBuf::from("/repo/.git")),
369-
tracked_branches: branches.iter().map(|b| b.to_string()).collect(),
369+
tracked_branches: branches.iter().map(ToString::to_string).collect(),
370370
artifact_mtimes: vec![None, None, None, None],
371371
}
372372
}

0 commit comments

Comments
 (0)