Skip to content

Commit

Permalink
refact: update panic msg for thread local nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromfedricci committed Nov 8, 2024
1 parent 46070f3 commit 35f1704
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/raw/thread_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl<T: ?Sized, R: Relax> Mutex<T, R> {
/// Panic: thread local node cannot be borrowed more than once at the same
/// time:
///
#[doc = concat!("```should_panic,", already_borrowed_error!())]
#[doc = concat!("```should_panic(expected = ", already_borrowed_error!(), ")")]
/// use malthlock::raw::spins::Mutex;
///
/// malthlock::thread_local_node!(static NODE);
Expand Down Expand Up @@ -366,7 +366,7 @@ impl<T: ?Sized, R: Relax> Mutex<T, R> {
/// Panic: thread local node cannot be borrowed more than once at the same
/// time:
///
#[doc = concat!("```should_panic,", already_borrowed_error!())]
#[doc = concat!("```should_panic(expected = ", already_borrowed_error!(), ")")]
/// use malthlock::raw::spins::Mutex;
///
/// malthlock::thread_local_node!(static NODE);
Expand Down
2 changes: 1 addition & 1 deletion src/thread_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ macro_rules! __thread_local_node_inner {
/// The local node error message as a string literal.
macro_rules! already_borrowed_error {
() => {
"malthlock::raw::LocalMutexNode is already mutably borrowed"
"malthlock's thread local node is already mutably borrowed"
};
}

0 comments on commit 35f1704

Please sign in to comment.