From 710def409e86d8a5f5197bb38b678b48aaadf1d1 Mon Sep 17 00:00:00 2001 From: Daniel Ceballos Date: Tue, 31 Aug 2021 16:14:04 -0500 Subject: [PATCH] Improve the reading of the code Change in line 3 to improve the reading of the code --- listings/ch09-error-handling/listing-09-06/src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/listings/ch09-error-handling/listing-09-06/src/main.rs b/listings/ch09-error-handling/listing-09-06/src/main.rs index 437d858f44..4f0a52163b 100644 --- a/listings/ch09-error-handling/listing-09-06/src/main.rs +++ b/listings/ch09-error-handling/listing-09-06/src/main.rs @@ -1,7 +1,6 @@ // ANCHOR: here use std::fs::File; -use std::io; -use std::io::Read; +use std::io::{self, Read}; fn read_username_from_file() -> Result { let f = File::open("hello.txt");