From f173022b702deacbca2c8a5be689c3d248c7ab66 Mon Sep 17 00:00:00 2001 From: Frank Plowman Date: Mon, 13 Jun 2022 18:37:04 +0100 Subject: [PATCH] make style of listings 9-7 and 9-8 consistent with 9-6 --- listings/ch09-error-handling/listing-09-07/src/main.rs | 3 +-- listings/ch09-error-handling/listing-09-08/src/main.rs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/listings/ch09-error-handling/listing-09-07/src/main.rs b/listings/ch09-error-handling/listing-09-07/src/main.rs index f4564f670d..0295949d23 100644 --- a/listings/ch09-error-handling/listing-09-07/src/main.rs +++ b/listings/ch09-error-handling/listing-09-07/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 mut username_file = File::open("hello.txt")?; diff --git a/listings/ch09-error-handling/listing-09-08/src/main.rs b/listings/ch09-error-handling/listing-09-08/src/main.rs index c3c6e23efc..ca672caad0 100644 --- a/listings/ch09-error-handling/listing-09-08/src/main.rs +++ b/listings/ch09-error-handling/listing-09-08/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 mut username = String::new();