Skip to content

Commit fa1e35c

Browse files
committed
Remove unnecessary else block from thread_local! expanded code
1 parent 340bb19 commit fa1e35c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/std/src/sys/pal/common/thread_local/fast_local.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ pub macro thread_local_inner {
9494
if let $crate::option::Option::Some(init) = init {
9595
if let $crate::option::Option::Some(value) = init.take() {
9696
return value;
97-
} else if $crate::cfg!(debug_assertions) {
97+
}
98+
if $crate::cfg!(debug_assertions) {
9899
$crate::unreachable!("missing default value");
99100
}
100101
}

0 commit comments

Comments
 (0)