From: Greg Burri Date: Sun, 18 Sep 2022 20:29:54 +0000 (+0200) Subject: Factorization of use statements. X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=8d2865a2198ce665f4331714f01c8c2f399f2263;p=rust_in_action.git Factorization of use statements. --- diff --git a/ch7-file-and-storage/src/fview.rs b/ch7-file-and-storage/src/fview.rs index 2f18dc4..3277713 100644 --- a/ch7-file-and-storage/src/fview.rs +++ b/ch7-file-and-storage/src/fview.rs @@ -1,6 +1,8 @@ -use std::fs::File; -use std::io::prelude::*; -use std::env; +use std::{ + fs::File, + io::prelude::*, + env, +}; const BYTES_PER_LINE: usize = 16; diff --git a/ch7-file-and-storage/src/main.rs b/ch7-file-and-storage/src/main.rs index af9214d..12745ea 100644 --- a/ch7-file-and-storage/src/main.rs +++ b/ch7-file-and-storage/src/main.rs @@ -1,6 +1,7 @@ -use std::fs::File; -use std::fs::OpenOptions; -use std::io::prelude::*; +use std::{ + fs::OpenOptions, + io::prelude::*, +}; mod serde; mod fview;