From 8d2865a2198ce665f4331714f01c8c2f399f2263 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Sun, 18 Sep 2022 22:29:54 +0200 Subject: [PATCH] Factorization of use statements. --- ch7-file-and-storage/src/fview.rs | 8 +++++--- ch7-file-and-storage/src/main.rs | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) 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; -- 2.45.2