From 6aa13a6e633b908f383eb49b3526dd464f5e5fdf Mon Sep 17 00:00:00 2001 From: Vlad Beskrovnyy Date: Fri, 15 Mar 2019 12:17:03 +0300 Subject: [PATCH] Fix code snippet ```rust type Result = Result; ``` This example [doesn't compiled](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=7b13da576c5fd89ca3e2a89720c3fc8c): ``` error[E0107]: wrong number of type arguments: expected 1, found 2 --> src/main.rs:1:28 | 1 | type Result = Result; | ^^^^^^^^^^^^^^ unexpected type argument error[E0391]: cycle detected when processing `Result` --> src/main.rs:1:18 | 1 | type Result = Result; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: ...which again requires processing `Result`, completing the cycle ``` --- src/ch19-04-advanced-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch19-04-advanced-types.md b/src/ch19-04-advanced-types.md index bb132a1436..6e3077bd18 100644 --- a/src/ch19-04-advanced-types.md +++ b/src/ch19-04-advanced-types.md @@ -143,7 +143,7 @@ The `Result<..., Error>` is repeated a lot. As such, `std::io` has this type of alias declaration: ```rust,ignore -type Result = Result; +type Result = std::result::Result; ``` Because this declaration is in the `std::io` module, we can use the fully