mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Remove unnecessary else block from thread_local!
expanded code
This commit is contained in:
parent
340bb19fea
commit
fa1e35c833
@ -94,7 +94,8 @@ pub macro thread_local_inner {
|
|||||||
if let $crate::option::Option::Some(init) = init {
|
if let $crate::option::Option::Some(init) = init {
|
||||||
if let $crate::option::Option::Some(value) = init.take() {
|
if let $crate::option::Option::Some(value) = init.take() {
|
||||||
return value;
|
return value;
|
||||||
} else if $crate::cfg!(debug_assertions) {
|
}
|
||||||
|
if $crate::cfg!(debug_assertions) {
|
||||||
$crate::unreachable!("missing default value");
|
$crate::unreachable!("missing default value");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user