diff --git a/Cargo.toml b/Cargo.toml index 987f882..6bba8bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "ferris-says" version = "0.3.1" authors = ["Michael Gattozzi "] +edition = "2021" description = "A Rust flavored replacement for the classic cowsay" documentation = "https://docs.rs/ferris-says" repository = "https://github.com/rust-lang/ferris-says" @@ -20,9 +21,9 @@ license = "MIT OR Apache-2.0" clippy = [] [dependencies] -smallvec = "1.9.0" -textwrap = "0.13" -unicode-width = "0.1.7" +smallvec = "1.11.2" +textwrap = "0.16.0" +unicode-width = "0.1.11" [workspace] members = ["fsays"] diff --git a/README.md b/README.md index 9f333d8..7804757 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ The following bit of code will write the byte string to STDOUT ```rust use ferris_says::say; -use std::io::{ stdout, BufWriter }; +use std::io::{stdout, BufWriter}; fn main() { let out = "Hello fellow Rustaceans!"; diff --git a/fsays/src/main.rs b/fsays/src/main.rs index 22fe6c9..44772a5 100644 --- a/fsays/src/main.rs +++ b/fsays/src/main.rs @@ -2,11 +2,13 @@ use clap::{App, Arg}; use ferris_says::*; -use std::error::Error; -use std::fs; -use std::io::{stderr, stdin, stdout, BufWriter, Read, Write}; -use std::process::exit; -use std::str; +use std::{ + error::Error, + fs, + io::{stderr, stdin, stdout, BufWriter, Read, Write}, + process::exit, + str, +}; // Constants used for err messages const ARGS: &str = "Invalid argument passed to fsays caused an error"; diff --git a/src/lib.rs b/src/lib.rs index 5782ac5..05008e4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,3 @@ -extern crate smallvec; -extern crate textwrap; -extern crate unicode_width; - use smallvec::*; use std::io::{Result, Write}; use textwrap::fill; @@ -57,8 +53,8 @@ const BUFSIZE: usize = 2048; /// The following bit of code will write the byte string to STDOUT /// /// ```rust -/// use ferris_says::*; -/// use std::io::{ stdout, BufWriter }; +/// use ferris_says::say; +/// use std::io::{stdout, BufWriter}; /// /// let stdout = stdout(); /// let out = "Hello fellow Rustaceans!"; diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 0729afe..aaac5b4 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -7,7 +7,7 @@ const DEFAULT_WIDTH: usize = 40; #[test] fn hello_fellow_rustaceans_width_24() -> Result<(), ()> { - //Hello fellow Rustaceans! + // Hello fellow Rustaceans! #[cfg(not(feature = "clippy"))] let expected = r#" __________________________ @@ -53,7 +53,7 @@ fn hello_fellow_rustaceans_width_24() -> Result<(), ()> { #[test] fn hello_fellow_rustaceans_width_12() -> Result<(), ()> { - //Hello fellow Rustaceans! + // Hello fellow Rustaceans! #[cfg(not(feature = "clippy"))] let expected = r#" ______________ @@ -101,7 +101,7 @@ fn hello_fellow_rustaceans_width_12() -> Result<(), ()> { #[test] fn hello_fellow_rustaceans_width_6() -> Result<(), ()> { - //Hello fellow Rustaceans! + // Hello fellow Rustaceans! #[cfg(not(feature = "clippy"))] let expected = r#" ________ @@ -153,7 +153,7 @@ fn hello_fellow_rustaceans_width_6() -> Result<(), ()> { #[test] fn hello_fellow_rustaceans_width_3() -> Result<(), ()> { - //Hello fellow Rustaceans! + // Hello fellow Rustaceans! #[cfg(not(feature = "clippy"))] let expected = r#" _____