replace core::tuple functions with methods

This commit is contained in:
Gareth Daniel Smith
2012-07-16 22:32:59 +01:00
parent 000d12f4af
commit fe43d66613
8 changed files with 34 additions and 29 deletions

View File

@@ -878,7 +878,7 @@ unsafe fn key_to_key_value<T>(key: local_data_key<T>) -> *libc::c_void {
// Keys are closures, which are (fnptr,envptr) pairs. Use fnptr.
// Use reintepret_cast -- transmute would leak (forget) the closure.
let pair: (*libc::c_void, *libc::c_void) = unsafe::reinterpret_cast(key);
tuple::first(pair)
pair.first()
}
// If returning some(..), returns with @T with the map's reference. Careful!