summaryrefslogtreecommitdiffstats
path: root/font
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2017-02-02 20:50:48 -0800
committerJoe Wilm <jwilm@users.noreply.github.com>2017-02-03 08:11:19 -0800
commitf2f750f9f3688e20d44bf43e6c0f568cf86edaa5 (patch)
tree176fa38cfe17e3b63e0df0dc3f9a14ce0db0d510 /font
parent875167a51006944da1a397fd0131b9aa69bf9a02 (diff)
Alacritty now compiles on stable Rust :tada:
Diffstat (limited to 'font')
-rw-r--r--font/src/lib.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/font/src/lib.rs b/font/src/lib.rs
index c5c0a2c7..7b8d92e7 100644
--- a/font/src/lib.rs
+++ b/font/src/lib.rs
@@ -17,8 +17,6 @@
//! CoreText is used on Mac OS.
//! FreeType is used on everything that's not Mac OS.
//! Eventually, ClearType support will be available for windows
-#![feature(integer_atomics)]
-
#[cfg(not(target_os = "macos"))]
extern crate fontconfig;
#[cfg(not(target_os = "macos"))]
@@ -44,7 +42,7 @@ extern crate log;
use std::hash::{Hash, Hasher};
use std::fmt;
-use std::sync::atomic::{AtomicU16, ATOMIC_U16_INIT, Ordering};
+use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
// If target isn't macos, reexport everything from ft
#[cfg(not(target_os = "macos"))]
@@ -123,10 +121,10 @@ impl FontKey {
///
/// The generated key will be globally unique
pub fn next() -> FontKey {
- static TOKEN: AtomicU16 = ATOMIC_U16_INIT;
+ static TOKEN: AtomicUsize = ATOMIC_USIZE_INIT;
FontKey {
- token: TOKEN.fetch_add(1, Ordering::SeqCst),
+ token: TOKEN.fetch_add(1, Ordering::SeqCst) as _,
}
}
}