Skip to content

Commit 4880308

Browse files
authored
Merge pull request ProgrammingRust#9 from Horki/ch_21_sync_once
ch21: libgit2-safe; replace deprecated const ONCE_INIT
2 parents 74adadb + db57079 commit 4880308

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libgit2-rs-safe/src/git/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ use std;
7575
use libc;
7676

7777
fn ensure_initialized() {
78-
static ONCE: std::sync::Once = std::sync::ONCE_INIT;
78+
static ONCE: std::sync::Once = std::sync::Once::new();
7979
ONCE.call_once(|| {
8080
unsafe {
8181
check(raw::git_libgit2_init())

0 commit comments

Comments
 (0)