Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

switch to swap now, since <-> is going away at some point

  • Loading branch information...
commit 49a5da6f8e65a41a02956def8080257ef584d0d3 1 parent 1fcc812
Jesse Luehrs authored April 01, 2013

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  src/util.rs
3  src/util.rs
... ...
@@ -1,4 +1,5 @@
1 1
 use core::libc::c_int;
  2
+use core::util::swap;
2 3
 
3 4
 pub fn guard<T> (finally: ~fn (), body: &fn () -> T) -> T {
4 5
     let _guard = Guard { finally: finally };
@@ -110,7 +111,7 @@ impl<T> Trie<T> {
110 111
 
111 112
     fn insert_vec (&self, loc: &mut Option<~TrieNode<T>>, bytes: &[u8], v: T) {
112 113
         let mut tmp = None;
113  
-        tmp <-> *loc;
  114
+        swap(&mut tmp, loc);
114 115
 
115 116
         let mut new = match tmp {
116 117
             Some(node) => node,

0 notes on commit 49a5da6

Please sign in to comment.
Something went wrong with that request. Please try again.