bug 1524684: geckodriver: ATOMIC_USIZE_INIT is deprecated; r=jgraham

ATOMIC_USIZE_INIT is deprecated and removed in Rust nightly (1.34.0).
The replacement is AtomicUsize::new(), which takes a usize argument.
The default argument of ATOMIC_USIZE_INIT was 0, so we'll use that.

Setting MAX_LOG_LEVEL to 0 effectively disables all logging
until logging::init() or ::init_with_level() is called, setting
MAX_LOG_LEVEL to the appropriate logging::Level value.

Differential Revision: https://phabricator.services.mozilla.com/D18680

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andreas Tolfsen 2019-02-05 14:48:14 +00:00
Родитель 7ea9c71b1e
Коммит 2646db47f6
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -31,13 +31,13 @@ use std::fmt;
use std::io;
use std::io::Write;
use std::str;
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
use std::sync::atomic::{AtomicUsize, Ordering};
use chrono;
use log;
use mozprofile::preferences::Pref;
static MAX_LOG_LEVEL: AtomicUsize = ATOMIC_USIZE_INIT;
static MAX_LOG_LEVEL: AtomicUsize = AtomicUsize::new(0);
const LOGGED_TARGETS: &'static [&'static str] = &[
"geckodriver",
"mozprofile",