Skip to content

Commit

Permalink
Remove unnecessary else block from thread_local! expanded code
Browse files Browse the repository at this point in the history
  • Loading branch information
ShoyuVanilla committed Feb 14, 2024
1 parent 340bb19 commit fa1e35c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/std/src/sys/pal/common/thread_local/fast_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ pub macro thread_local_inner {
if let $crate::option::Option::Some(init) = init {
if let $crate::option::Option::Some(value) = init.take() {
return value;
} else if $crate::cfg!(debug_assertions) {
}
if $crate::cfg!(debug_assertions) {
$crate::unreachable!("missing default value");
}
}
Expand Down

0 comments on commit fa1e35c

Please sign in to comment.