diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-02-25 04:21:10 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-02-25 04:21:10 +0530 |
| commit | ac02f9c18d601bec9740c552d0ba554ae62bd60c (patch) | |
| tree | 1c7adcf26636a78398c7e0d5580dc9077c2825b2 /src/libstd/sys | |
| parent | 2e89dee63902fd45ef21397bd15afd371e3cdbf9 (diff) | |
| parent | fbfe70e6ab26c0cccb5fbbf5b805eecb751cb576 (diff) | |
| download | rust-ac02f9c18d601bec9740c552d0ba554ae62bd60c.tar.gz rust-ac02f9c18d601bec9740c552d0ba554ae62bd60c.zip | |
Rollup merge of #31842 - dileepbapat:master, r=alexcrichton
I have made changes and built it after that. Please advise, https://github.com/rust-lang/rust/issues/31820
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/windows/thread_local.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libstd/sys/windows/thread_local.rs b/src/libstd/sys/windows/thread_local.rs index 6a5c38ed9d0..59da74b7287 100644 --- a/src/libstd/sys/windows/thread_local.rs +++ b/src/libstd/sys/windows/thread_local.rs @@ -69,9 +69,8 @@ static mut DTORS: *mut Vec<(Key, Dtor)> = ptr::null_mut(); pub unsafe fn create(dtor: Option<Dtor>) -> Key { let key = c::TlsAlloc(); assert!(key != c::TLS_OUT_OF_INDEXES); - match dtor { - Some(f) => register_dtor(key, f), - None => {} + if let Some(f) = dtor { + register_dtor(key, f); } return key; } |
