core: Eliminate some overloading of the name "future" in future.rs
This commit is contained in:
@@ -14,6 +14,7 @@ io::println(#fmt(\"fib(5000) = %?\", delayed_fib.get()))
|
||||
import either::either;
|
||||
|
||||
export future;
|
||||
export extensions;
|
||||
export from_value;
|
||||
export from_port;
|
||||
export from_fn;
|
||||
@@ -27,7 +28,7 @@ enum future<A> = {
|
||||
};
|
||||
|
||||
#[doc = "Methods on the `future` type"]
|
||||
impl future<A:copy send> for future<A> {
|
||||
impl extensions<A:copy send> for future<A> {
|
||||
|
||||
fn get() -> A {
|
||||
#[doc = "Get the value of the future"];
|
||||
|
||||
@@ -6,8 +6,8 @@ import ip = net_ip;
|
||||
import uv::iotask;
|
||||
import uv::iotask::iotask;
|
||||
import comm::methods;
|
||||
import future::future;
|
||||
import future_spawn = future::spawn;
|
||||
import future::extensions;
|
||||
// FIXME #1935
|
||||
// should be able to, but can't atm, replace w/ result::{result, extensions};
|
||||
import result::*;
|
||||
@@ -303,7 +303,7 @@ A `future` value that, once the `write` operation completes, resolves to a
|
||||
value as the `err` variant
|
||||
"]
|
||||
fn write_future(sock: tcp_socket, raw_write_data: ~[u8])
|
||||
-> future<result::result<(), tcp_err_data>> unsafe {
|
||||
-> future::future<result::result<(), tcp_err_data>> unsafe {
|
||||
let socket_data_ptr = ptr::addr_of(*(sock.socket_data));
|
||||
do future_spawn || {
|
||||
let data_copy = copy(raw_write_data);
|
||||
@@ -395,7 +395,7 @@ Otherwise, use the blocking `tcp::read` function instead.
|
||||
read attempt. Pass `0u` to wait indefinitely
|
||||
"]
|
||||
fn read_future(sock: tcp_socket, timeout_msecs: uint)
|
||||
-> future<result::result<~[u8],tcp_err_data>> {
|
||||
-> future::future<result::result<~[u8],tcp_err_data>> {
|
||||
let socket_data = ptr::addr_of(*(sock.socket_data));
|
||||
do future_spawn || {
|
||||
read_common_impl(socket_data, timeout_msecs)
|
||||
|
||||
@@ -3,7 +3,7 @@ import comm::chan;
|
||||
import comm::send;
|
||||
import comm::recv;
|
||||
import future_spawn = future::spawn;
|
||||
import future::future;
|
||||
import future::extensions;
|
||||
import core::vec::extensions;
|
||||
|
||||
export map, mapi, alli, any, mapi_factory;
|
||||
|
||||
Reference in New Issue
Block a user