From fa8e71a8257f4226ab532d4bf268d3ecbfa98eb4 Mon Sep 17 00:00:00 2001 From: Marvin Löbel Date: Fri, 11 Oct 2013 23:20:34 +0200 Subject: Allow fail messages to be caught, and introduce the Any trait Some code cleanup, sorting of import blocks Removed std::unstable::UnsafeArc's use of Either Added run-fail tests for the new FailWithCause impls Changed future_result and try to return Result<(), ~Any>. - Internally, there is an enum of possible fail messages passend around. - In case of linked failure or a string message, the ~Any gets lazyly allocated in future_results recv method. - For that, future result now returns a wrapper around a Port. - Moved and renamed task::TaskResult into rt::task::UnwindResult and made it an internal enum. - Introduced a replacement typedef `type TaskResult = Result<(), ~Any>`. --- src/libstd/run.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd/run.rs') diff --git a/src/libstd/run.rs b/src/libstd/run.rs index 615ba60e066..6e7d681d40a 100644 --- a/src/libstd/run.rs +++ b/src/libstd/run.rs @@ -426,7 +426,7 @@ mod tests { os::close(pipe_err.out); do spawn { - writeclose(pipe_in.out, ~"test"); + writeclose(pipe_in.out, "test"); } let actual = readclose(pipe_out.input); readclose(pipe_err.input); -- cgit 1.4.1-3-g733a5