Skip to content

Commit

Permalink
release: 0.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstoik1 committed Nov 28, 2024
2 parents c2d3d9c + a9d39c6 commit f2772b3
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 59 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@



## [0.10.1](https://github.com/Blobfolio/dowser/releases/tag/v0.10.1) - 2024-11-28

### Changed

* Bump `brunch` to `0.7`
* Bump `dactyl` to `0.8`
* Miscellaneous code cleanup and lints



## [0.10.0](https://github.com/Blobfolio/dowser/releases/tag/v0.10.0) - 2024-10-22

### New
Expand Down
26 changes: 20 additions & 6 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# Project Dependencies
Package: dowser
Version: 0.10.0
Generated: 2024-10-23 04:07:24 UTC
Version: 0.10.1
Generated: 2024-11-28 19:17:52 UTC

| Package | Version | Author(s) | License |
| ---- | ---- | ---- | ---- |
| [ahash](https://github.com/tkaitchuck/ahash) | 0.8.11 | [Tom Kaitchuck](mailto:[email protected]) | Apache-2.0 or MIT |
| [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:[email protected]) | Apache-2.0 or MIT |
| [dactyl](https://github.com/Blobfolio/dactyl) | 0.7.4 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [zerocopy](https://github.com/google/zerocopy) | 0.7.35 | [Joshua Liebow-Feeser](mailto:[email protected]) | Apache-2.0, BSD-2-Clause, or MIT |
| [**ahash**](https://github.com/tkaitchuck/ahash) | 0.8.11 | [Tom Kaitchuck](mailto:[email protected]) | MIT OR Apache-2.0 |
| [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:[email protected]) | MIT OR Apache-2.0 |
| [**dactyl**](https://github.com/Blobfolio/dactyl) | 0.8.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
| [version_check](https://github.com/SergioBenitez/version_check) ⚒️ | 0.9.5 | [Sergio Benitez](mailto:[email protected]) | MIT OR Apache-2.0 |
| [zerocopy](https://github.com/google/zerocopy) | 0.7.35 | [Joshua Liebow-Feeser](mailto:[email protected]) | BSD-2-Clause OR Apache-2.0 OR MIT |
| [zerocopy-derive](https://github.com/google/zerocopy) | 0.7.35 | [Joshua Liebow-Feeser](mailto:[email protected]) | BSD-2-Clause OR Apache-2.0 OR MIT |
| [_once_cell_](https://github.com/matklad/once_cell) | 1.20.2 | [Aleksey Kladov](mailto:[email protected]) | MIT OR Apache-2.0 |
| [_proc-macro2_](https://github.com/dtolnay/proc-macro2) ⚒️ | 1.0.92 | [David Tolnay](mailto:[email protected]) and [Alex Crichton](mailto:[email protected]) | MIT OR Apache-2.0 |
| [_quote_](https://github.com/dtolnay/quote) ⚒️ | 1.0.37 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
| [_syn_](https://github.com/dtolnay/syn) ⚒️ | 2.0.89 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
| [_unicode-ident_](https://github.com/dtolnay/unicode-ident) ⚒️ | 1.0.14 | [David Tolnay](mailto:[email protected]) | (MIT OR Apache-2.0) AND Unicode-3.0 |

### Legend

* **Direct Dependency**
* Child Dependency
* _Optional Dependency_
* ⚒️ Build-Only
11 changes: 4 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dowser"
version = "0.10.0"
authors = ["Blobfolio, LLC. <hello@blobfolio.com>"]
version = "0.10.1"
authors = ["Josh Stoik <josh@blobfolio.com>"]
edition = "2021"
rust-version = "1.81"
description = "A recursive, canonicalizing file finding library for Unix."
Expand All @@ -24,19 +24,16 @@ default-target = "x86_64-unknown-linux-gnu"

[package.metadata.bashman]
name = "Dowser"
bash-dir = "./"
man-dir = "./"
credits-dir = "./"

[dependencies]
dactyl = "0.7.*"
dactyl = "0.8.*"

[dependencies.ahash]
version = "0.8.*"
default-features = false

[dev-dependencies]
brunch = "0.6.*"
brunch = "0.7.*"

[[bench]]
name = "dowser"
Expand Down
34 changes: 2 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,46 +60,16 @@ assert_eq!(files1.len(), files2.len());
let files1: Vec::<PathBuf> = Dowser::default()
.with_path("/usr/share/man")
.filter(|p|
p.extension().map_or(
false,
|e| e.eq_ignore_ascii_case("gz")
)
p.extension().is_some_and(|e| e.eq_ignore_ascii_case("gz"))
)
.collect();

// Same as above, but slightly faster.
let files2: Vec::<PathBuf> = Dowser::default()
.with_path("/usr/share/man")
.into_vec_filtered(|p|
p.extension().map_or(
false,
|e| e.eq_ignore_ascii_case("gz")
)
p.extension().is_some_and(|e| e.eq_ignore_ascii_case("gz"))
);

assert_eq!(files1.len(), files2.len());
```



## License

See also: [CREDITS.md](CREDITS.md)

Copyright © 2024 [Blobfolio, LLC](https://blobfolio.com) &lt;[email protected]&gt;

This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <[email protected]>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.
2 changes: 1 addition & 1 deletion benches/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn test_std<P>(path: P) -> bool
where P: AsRef<Path> {
path.as_ref()
.extension()
.map_or(false, |p| p.as_bytes().eq_ignore_ascii_case(JPG_ARR))
.is_some_and(|p| p.as_bytes().eq_ignore_ascii_case(JPG_ARR))
}

/// # Dowser.
Expand Down
10 changes: 5 additions & 5 deletions src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ macro_rules! path_slice {
/// let paths = vec![PathBuf::from("/path/to/image.png")];
///
/// paths.iter()
/// .filter(|p| p.extension()
/// .map_or(false, |e| e.eq_ignore_ascii_case(OsStr::new("png")))
/// )
/// .filter(|p| p.extension().is_some_and(|e|
/// e.eq_ignore_ascii_case(OsStr::new("png"))
/// ))
/// .for_each(|p| todo!());
/// ```
///
Expand All @@ -128,7 +128,7 @@ macro_rules! path_slice {
/// const EXT: Extension = Extension::new3(*b"png");
///
/// paths.iter()
/// .filter(|p| Extension::try_from3(p).map_or(false, |e| e == EXT))
/// .filter(|p| Extension::try_from3(p) == Some(EXT))
/// .for_each(|p| todo!());
/// ```
pub enum Extension {
Expand Down Expand Up @@ -196,7 +196,7 @@ where P: AsRef<Path> {
Self::Ext3(_) => Self::try_from3(other),
Self::Ext4(_) => Self::try_from4(other),
}
.map_or(false, |e| e.eq(self))
.is_some_and(|e| e.eq(self))
}
}

Expand Down
10 changes: 2 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,15 @@ assert_eq!(files1.len(), files2.len());
let files1: Vec::<PathBuf> = Dowser::default()
.with_path("/usr/share/man")
.filter(|p|
p.extension().map_or(
false,
|e| e.eq_ignore_ascii_case("gz")
)
p.extension().is_some_and(|e| e.eq_ignore_ascii_case("gz"))
)
.collect();
// Same as above, but slightly faster.
let files2: Vec::<PathBuf> = Dowser::default()
.with_path("/usr/share/man")
.into_vec_filtered(|p|
p.extension().map_or(
false,
|e| e.eq_ignore_ascii_case("gz")
)
p.extension().is_some_and(|e| e.eq_ignore_ascii_case("gz"))
);
assert_eq!(files1.len(), files2.len());
Expand Down

0 comments on commit f2772b3

Please sign in to comment.