Skip to content

Commit

Permalink
Merge pull request #46 from BD103/main
Browse files Browse the repository at this point in the history
Cleanup and update the project
  • Loading branch information
lcnr authored Mar 30, 2024
2 parents 56cd38e + d5f6ec6 commit ee28135
Showing 5 changed files with 18 additions and 19 deletions.
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
name = "ferris-says"
version = "0.3.1"
authors = ["Michael Gattozzi <mgattozzi@gmail.com>"]
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"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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!";
12 changes: 7 additions & 5 deletions fsays/src/main.rs
Original file line number Diff line number Diff line change
@@ -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";
8 changes: 2 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -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!";
8 changes: 4 additions & 4 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
@@ -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#"
_____

0 comments on commit ee28135

Please sign in to comment.