Commit f149f8f1 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Don't use ONCE_INIT anymore now that Once::new() is const

parent fbbd7095
Pipeline #48122 passed with stages
in 20 minutes and 41 seconds
......@@ -14,8 +14,8 @@ use std::path::PathBuf;
use gstcdg;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -21,8 +21,8 @@ extern crate pretty_assertions;
use glib::prelude::*;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -24,8 +24,8 @@ use rand::{Rng, SeedableRng};
use std::path::PathBuf;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -20,8 +20,8 @@
extern crate pretty_assertions;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -25,8 +25,8 @@ use rand::{Rng, SeedableRng};
use std::collections::VecDeque;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -15,8 +15,8 @@ extern crate gstreamer_video as gst_video;
extern crate gstrav1e;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -12,8 +12,8 @@ use gstreamer as gst;
use std::sync::mpsc;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -54,8 +54,8 @@ lazy_static! {
}
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -55,8 +55,8 @@ lazy_static! {
}
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -24,8 +24,8 @@ extern crate gstreamer_check as gst_check;
extern crate gstthreadshare;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -28,8 +28,8 @@ use std::sync::{Arc, Mutex};
extern crate gstthreadshare;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -28,8 +28,8 @@ use std::sync::{Arc, Mutex};
extern crate gstthreadshare;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -31,8 +31,8 @@ use std::{thread, time};
extern crate gstthreadshare;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -28,8 +28,8 @@ use std::thread;
extern crate gstthreadshare;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
......@@ -30,8 +30,8 @@ use std::thread;
extern crate gsttogglerecord;
fn init() {
use std::sync::{Once, ONCE_INIT};
static INIT: Once = ONCE_INIT;
use std::sync::Once;
static INIT: Once = Once::new();
INIT.call_once(|| {
gst::init().unwrap();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment