-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
219 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
# Changelog | ||
|
||
## [0.1.1](https://github.com/Blobfolio/trimothy/releases/tag/v0.1.1) - 2022-04-11 | ||
|
||
## Changes | ||
|
||
* Minor performance improvements | ||
|
||
## Fixed | ||
|
||
* Return empty slice when all bytes match trim predicate. | ||
* Markdown (docs) formatting issues. | ||
|
||
|
||
|
||
## [0.1.0](https://github.com/Blobfolio/trimothy/releases/tag/v0.1.0) - 2022-04-11 | ||
|
||
Initial release! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Project Dependencies | ||
Package: trimothy | ||
Version: 0.1.0 | ||
Generated: 2022-04-11 21:07:33 UTC | ||
Version: 0.1.1 | ||
Generated: 2022-04-12 05:23:34 UTC | ||
|
||
This package has no dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/*! | ||
# Benchmark: Trim Slice | ||
*/ | ||
|
||
use brunch::{ | ||
Bench, | ||
benches, | ||
}; | ||
use trimothy::TrimMut; | ||
use std::time::Duration; | ||
|
||
|
||
|
||
const BYTES: &[u8] = b" \t\nHello World!\n\t "; | ||
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::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()", "to_owned()") | ||
.timed(Duration::from_secs(1)) | ||
.with_setup(STR.to_owned(), |s| s.trim().to_owned()), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.