From 00db885e88bd3957872278d41f991046435d335c Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 31 Mar 2021 15:09:38 +0200 Subject: Ensure order in the galaxy... I mean the imports This patch sorts the imports: 1. std imports 2. external crate imports 3. own module imports In three blocks, each alphabetically (with is also enforced by rustfmt). As well as it prefixes the imports of own modules with crate:: This is just a quality-of-life patch :-) Signed-off-by: Matthias Beyer --- src/file/source/file.rs | 7 +++---- src/file/source/mod.rs | 2 +- src/file/source/string.rs | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/file/source') diff --git a/src/file/source/file.rs b/src/file/source/file.rs index 12805fd..75634dd 100644 --- a/src/file/source/file.rs +++ b/src/file/source/file.rs @@ -1,13 +1,12 @@ -use std::error::Error; - -use file::format::ALL_EXTENSIONS; use std::env; +use std::error::Error; use std::fs; use std::io::{self, Read}; use std::iter::Iterator; use std::path::{Path, PathBuf}; -use super::{FileFormat, FileSource}; +use crate::file::format::ALL_EXTENSIONS; +use crate::file::{FileFormat, FileSource}; /// Describes a file sourced from a file #[derive(Clone, Debug)] diff --git a/src/file/source/mod.rs b/src/file/source/mod.rs index 7d8e6a5..3b42a55 100644 --- a/src/file/source/mod.rs +++ b/src/file/source/mod.rs @@ -4,7 +4,7 @@ pub mod string; use std::error::Error; use std::fmt::Debug; -use super::FileFormat; +use crate::file::FileFormat; /// Describes where the file is sourced pub trait FileSource: Debug + Clone { diff --git a/src/file/source/string.rs b/src/file/source/string.rs index cd2089d..2fede45 100644 --- a/src/file/source/string.rs +++ b/src/file/source/string.rs @@ -1,6 +1,7 @@ -use super::{FileFormat, FileSource}; use std::error::Error; +use crate::file::{FileFormat, FileSource}; + /// Describes a file sourced from a string #[derive(Clone, Debug)] pub struct FileSourceString(String); -- cgit v1.2.3