aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-04-01 21:00:55 -0500
committerJesse Luehrs <doy@tozt.net>2013-04-01 21:00:55 -0500
commit49a5da6f8e65a41a02956def8080257ef584d0d3 (patch)
treefe9695b3ab210ff60b69ab07eccb5e7669afd98a
parent1fcc81291dcc3a23fedc853d7d036a3191d37675 (diff)
downloadrust-term-49a5da6f8e65a41a02956def8080257ef584d0d3.tar.gz
rust-term-49a5da6f8e65a41a02956def8080257ef584d0d3.zip
switch to swap now, since <-> is going away at some point
-rw-r--r--src/util.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util.rs b/src/util.rs
index ea3f638..984dcd2 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -1,4 +1,5 @@
use core::libc::c_int;
+use core::util::swap;
pub fn guard<T> (finally: ~fn (), body: &fn () -> T) -> T {
let _guard = Guard { finally: finally };
@@ -110,7 +111,7 @@ impl<T> Trie<T> {
fn insert_vec (&self, loc: &mut Option<~TrieNode<T>>, bytes: &[u8], v: T) {
let mut tmp = None;
- tmp <-> *loc;
+ swap(&mut tmp, loc);
let mut new = match tmp {
Some(node) => node,