use AtomicUsize::new(0) instead of ATOMIC_USIZE_INIT
Replace ATOMIC_USIZE_INIT with AtomicUsize::new(0) as the constant has been deprecated in favour of calling the constructor.
This commit is contained in:
1 parent
67ec001c11
commit
073f9fb1f8
4 files changed
+4
-4
No files matched your search
+1
-1
@@ -3,7 +3,7 @@ use failure::Error;
|
||||
use std::cell::RefMut;
|
||||
use term::{KeyCode, KeyModifiers, MouseEvent, TerminalHost};
|
||||
|
||||
static TAB_ID: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::ATOMIC_USIZE_INIT;
|
||||
static TAB_ID: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::AtomicUsize::new(0);
|
||||
pub type TabId = usize;
|
||||
|
||||
pub fn alloc_tab_id() -> TabId {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
use crate::mux::{Tab, TabId};
|
||||
use std::rc::Rc;
|
||||
|
||||
static WIN_ID: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::ATOMIC_USIZE_INIT;
|
||||
static WIN_ID: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::AtomicUsize::new(0);
|
||||
pub type WindowId = usize;
|
||||
|
||||
pub struct Window {
|
||||
|
||||
@@ -88,7 +88,7 @@ impl ImageCell {
|
||||
}
|
||||
}
|
||||
|
||||
static IMAGE_ID: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::ATOMIC_USIZE_INIT;
|
||||
static IMAGE_ID: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::AtomicUsize::new(0);
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct ImageData {
|
||||
|
||||
@@ -113,7 +113,7 @@ impl ScreenRelativeCoords {
|
||||
}
|
||||
}
|
||||
|
||||
static WIDGET_ID: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::ATOMIC_USIZE_INIT;
|
||||
static WIDGET_ID: ::std::sync::atomic::AtomicUsize = ::std::sync::atomic::AtomicUsize::new(0);
|
||||
|
||||
/// The `WidgetId` uniquely describes an instance of a widget.
|
||||
/// Creating a new `WidgetId` generates a new unique identifier which can
|
||||
|
||||
Reference in new issue
Block a user