We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d3e48fa + bb2fe87 commit 539b264Copy full SHA for 539b264
openssl-sys/src/lib.rs
@@ -218,7 +218,10 @@ pub fn init() {
218
SSL_load_error_strings();
219
220
let num_locks = CRYPTO_num_locks();
221
- let mutexes = Box::new(range(0, num_locks).map(|_| MUTEX_INIT).collect::<Vec<_>>());
+ let mut mutexes = Box::new(Vec::new());
222
+ for _ in 0..num_locks {
223
+ mutexes.push(MUTEX_INIT);
224
+ }
225
MUTEXES = mem::transmute(mutexes);
226
let guards: Box<Vec<Option<MutexGuard<()>>>> =
227
Box::new(range(0, num_locks).map(|_| None).collect());
0 commit comments