From 1b01971b91d66abb61634c79806f411c83a6949e Mon Sep 17 00:00:00 2001 From: LeopoldArkham Date: Sun, 27 Oct 2019 02:09:40 +0100 Subject: [PATCH] Move tests and bump to 2018 edition --- Cargo.toml | 1 + src/file_size_opts/defaults.rs | 2 +- src/lib.rs | 1 - tests/test.rs | 3 ++- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0285ad7..c4eacd4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "humansize" version = "1.1.1" authors = ["Leopold Arkham "] +edition = "2018" description = "A configurable crate to easily represent file sizes in a human-readable format." diff --git a/src/file_size_opts/defaults.rs b/src/file_size_opts/defaults.rs index 925f7f6..9d212ed 100644 --- a/src/file_size_opts/defaults.rs +++ b/src/file_size_opts/defaults.rs @@ -1,4 +1,4 @@ -use file_size_opts::{ +use crate::file_size_opts::{ FileSizeOpts, Kilo, FixedAt, diff --git a/src/lib.rs b/src/lib.rs index fe25f2c..7c8076b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,7 +15,6 @@ //! provided by the options module. //! //! ```rust -//! extern crate humansize; //! use humansize::{FileSize, file_size_opts as options}; //! //! fn main() { diff --git a/tests/test.rs b/tests/test.rs index e58de23..42911f0 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -1,5 +1,6 @@ -use humansize::{file_size_opts, FileSize}; +use humansize::{file_size_opts::{self, BINARY, DECIMAL, CONVENTIONAL}, FileSize}; +#[test] fn test_sizes() { assert_eq!(0.file_size(BINARY).unwrap(), "0 B");