Skip to content

Commit

Permalink
release: 0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstoik1 committed Sep 22, 2022
2 parents c9878b6 + c7305e7 commit b9c2764
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 45 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@



## [0.1.4](https://github.com/Blobfolio/trimothy/releases/tag/v0.1.4) - 2022-09-22

### Changed

* Lower MSRV `1.56`
* Improve docs



## [0.1.3](https://github.com/Blobfolio/trimothy/releases/tag/v0.1.3) - 2022-05-30

### Changed
Expand Down
4 changes: 2 additions & 2 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Project Dependencies
Package: trimothy
Version: 0.1.3
Generated: 2022-05-31 02:54:49 UTC
Version: 0.1.4
Generated: 2022-09-22 18:17:40 UTC

This package has no dependencies.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "trimothy"
version = "0.1.3"
version = "0.1.4"
authors = ["Blobfolio, LLC. <[email protected]>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.56"
description = "Traits for trimming slices, vecs, and strings."
license = "WTFPL"
repository = "https://github.com/Blobfolio/trimothy"
Expand All @@ -25,7 +25,7 @@ man-dir = "./"
credits-dir = "./"

[dev-dependencies]
brunch = "0.2.*, >=0.2.5"
brunch = "0.3.*"

[[bench]]
name = "fn_trim_slice"
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Trimothy

[![Documentation](https://docs.rs/trimothy/badge.svg)](https://docs.rs/trimothy/)
[![crates.io](https://img.shields.io/crates/v/trimothy.svg)](https://crates.io/crates/trimothy)
[![Build Status](https://github.com/Blobfolio/trimothy/workflows/Build/badge.svg)](https://github.com/Blobfolio/trimothy/actions)
[![Dependency Status](https://deps.rs/repo/github/blobfolio/trimothy/status.svg)](https://deps.rs/repo/github/blobfolio/trimothy)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/Blobfolio/trimothy)
[![docs.rs](https://img.shields.io/docsrs/trimothy.svg?style=flat-square&label=docs.rs)](https://docs.rs/trimothy/)
[![changelog](https://img.shields.io/crates/v/trimothy.svg?style=flat-square&label=changelog&color=9b59b6)](https://github.com/Blobfolio/trimothy/blob/master/CHANGELOG.md)<br>
[![crates.io](https://img.shields.io/crates/v/trimothy.svg?style=flat-square&label=crates.io)](https://crates.io/crates/trimothy)
[![ci](https://img.shields.io/github/workflow/status/Blobfolio/trimothy/Build.svg?style=flat-square&label=ci)](https://github.com/Blobfolio/trimothy/actions)
[![deps.rs](https://deps.rs/repo/github/blobfolio/trimothy/status.svg?style=flat-square&label=deps.rs)](https://deps.rs/repo/github/blobfolio/trimothy)<br>
[![license](https://img.shields.io/badge/license-wtfpl-ff1493?style=flat-square)](https://en.wikipedia.org/wiki/WTFPL)
[![contributions welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square&label=contributions)](https://github.com/Blobfolio/trimothy/issues)

Trimothy is a small library that expands on the limited String- and slice-trimming capabilities provided by the standard library.

Expand Down
16 changes: 6 additions & 10 deletions benches/fn_trim_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use brunch::{
benches,
};
use trimothy::TrimMut;
use std::time::Duration;



Expand All @@ -17,17 +16,14 @@ const STR: &str = " \t\nHello World!\n\t ";


benches!(
Bench::new("Vec<u8>", "trim_mut()")
.timed(Duration::from_secs(1))
.with_setup(BYTES.to_vec(), |mut v| v.trim_mut()),
Bench::new("Vec<u8>::trim_mut()")
.run_seeded(BYTES.to_vec(), |mut v| v.trim_mut()),

Bench::spacer(),

Bench::new("String", "trim_mut()")
.timed(Duration::from_secs(1))
.with_setup(STR.to_owned(), |mut s| s.trim_mut()),
Bench::new("String::trim_mut()")
.run_seeded(STR.to_owned(), |mut s| s.trim_mut()),

Bench::new("String.trim()", "to_owned()")
.timed(Duration::from_secs(1))
.with_setup(STR.to_owned(), |s| s.trim().to_owned()),
Bench::new("String.trim()::to_owned()")
.run_seeded(STR.to_owned(), |s| s.trim().to_owned()),
);
41 changes: 16 additions & 25 deletions benches/fn_trim_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use trimothy::{
TrimSlice,
TrimSliceMatches,
};
use std::time::Duration;



Expand All @@ -20,41 +19,33 @@ const STR: &str = " \t\nHello World!\n\t ";


benches!(
Bench::new("&[u8]", "trim()")
.timed(Duration::from_secs(1))
.with(|| BYTES.trim()),
Bench::new("&[u8]::trim()")
.run(|| BYTES.trim()),

Bench::new("&str", "trim()")
.timed(Duration::from_secs(1))
.with(|| STR.trim()),
Bench::new("&str::trim()")
.run(|| STR.trim()),

Bench::spacer(),

Bench::new("&[u8]", "trim_start()")
.timed(Duration::from_secs(1))
.with(|| BYTES.trim_start()),
Bench::new("&[u8]::trim_start()")
.run(|| BYTES.trim_start()),

Bench::new("&str", "trim_start()")
.timed(Duration::from_secs(1))
.with(|| STR.trim_start()),
Bench::new("&str::trim_start()")
.run(|| STR.trim_start()),

Bench::spacer(),

Bench::new("&[u8]", "trim_end()")
.timed(Duration::from_secs(1))
.with(|| BYTES.trim_end()),
Bench::new("&[u8]::trim_end()")
.run(|| BYTES.trim_end()),

Bench::new("&str", "trim_end()")
.timed(Duration::from_secs(1))
.with(|| STR.trim_end()),
Bench::new("&str::trim_end()")
.run(|| STR.trim_end()),

Bench::spacer(),

Bench::new("&[u8]", "trim_start_matches()")
.timed(Duration::from_secs(1))
.with(|| BYTES.trim_start_matches(|b| matches!(b, b'\t' | b' ' | b'\n' | b'H' | b'e'))),
Bench::new("&[u8]::trim_start_matches()")
.run(|| BYTES.trim_start_matches(|b| matches!(b, b'\t' | b' ' | b'\n' | b'H' | b'e'))),

Bench::new("&str", "trim_start_matches()")
.timed(Duration::from_secs(1))
.with(|| STR.trim_start_matches(|c| matches!(c, '\t' | ' ' | '\n' | 'H' | 'e'))),
Bench::new("&str::trim_start_matches()")
.run(|| STR.trim_start_matches(|c| matches!(c, '\t' | ' ' | '\n' | 'H' | 'e'))),
);
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
/*!
# Trimothy
[![docs.rs](https://img.shields.io/docsrs/trimothy.svg?style=flat-square&label=docs.rs)](https://docs.rs/trimothy/)
[![changelog](https://img.shields.io/crates/v/trimothy.svg?style=flat-square&label=changelog&color=9b59b6)](https://github.com/Blobfolio/trimothy/blob/master/CHANGELOG.md)<br>
[![crates.io](https://img.shields.io/crates/v/trimothy.svg?style=flat-square&label=crates.io)](https://crates.io/crates/trimothy)
[![ci](https://img.shields.io/github/workflow/status/Blobfolio/trimothy/Build.svg?style=flat-square&label=ci)](https://github.com/Blobfolio/trimothy/actions)
[![deps.rs](https://deps.rs/repo/github/blobfolio/trimothy/status.svg?style=flat-square&label=deps.rs)](https://deps.rs/repo/github/blobfolio/trimothy)<br>
[![license](https://img.shields.io/badge/license-wtfpl-ff1493?style=flat-square)](https://en.wikipedia.org/wiki/WTFPL)
[![contributions welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square&label=contributions)](https://github.com/Blobfolio/trimothy/issues)
Trimothy is a small library that expands on the limited String- and slice-trimming capabilities provided by the standard library.
If any of these methods happened to be introduced into stable Rust in the future, they will simply be removed from here.
Expand Down

0 comments on commit b9c2764

Please sign in to comment.