Skip to content

Commit

Permalink
Better panic message formatting
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Fitzgerald <[email protected]>
  • Loading branch information
alexpyattaev and apfitzge committed Jan 10, 2025
1 parent 022f958 commit 8fd7713
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions thread-manager/src/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ pub fn set_thread_affinity(cores: &[usize]) {
);
if let Err(e) = affinity::set_thread_affinity(cores) {
let thread = std::thread::current();
let msg = format!(
"Can not set core affinity {:?} for thread {:?} named {:?}, error {e}",
panic!(
"Can not set core affinity {:?} for thread {:?} named {:?}, error {}",
cores,
thread.id(),
thread.name()
thread.name(),
e
);
panic!("{}", msg);
}
}

Expand Down

0 comments on commit 8fd7713

Please sign in to comment.