Use std::sync::atomic::Ordering explicitly.

This commit is contained in:
Ms2ger 2015-01-22 13:25:20 +01:00
parent 524966e3af
commit faefb27f3e
8 changed files with 22 additions and 22 deletions

View file

@ -12,7 +12,7 @@ use flow;
use std::mem;
use std::ptr;
use std::raw;
use std::sync::atomic::SeqCst;
use std::sync::atomic::Ordering;
#[unsafe_no_drop_flag]
pub struct FlowRef {
@ -55,7 +55,7 @@ impl Drop for FlowRef {
if self.object.vtable.is_null() {
return
}
if flow::base(&**self).ref_count().fetch_sub(1, SeqCst) > 1 {
if flow::base(&**self).ref_count().fetch_sub(1, Ordering::SeqCst) > 1 {
return
}
let flow_ref: FlowRef = mem::replace(self, FlowRef {
@ -75,7 +75,7 @@ impl Drop for FlowRef {
impl Clone for FlowRef {
fn clone(&self) -> FlowRef {
unsafe {
drop(flow::base(self.deref()).ref_count().fetch_add(1, SeqCst));
drop(flow::base(self.deref()).ref_count().fetch_add(1, Ordering::SeqCst));
FlowRef {
object: raw::TraitObject {
vtable: self.object.vtable,