From b3896d8618a6d0ff7b083f205905461d69d0d3cf Mon Sep 17 00:00:00 2001 From: Josh Stoik Date: Wed, 30 Oct 2024 23:14:23 -0700 Subject: [PATCH 1/5] docs --- Cargo.toml | 5 +---- README.md | 24 ------------------------ 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dab997d..1c6417f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dowser" version = "0.10.0" -authors = ["Blobfolio, LLC. "] +authors = ["Josh Stoik "] edition = "2021" rust-version = "1.81" description = "A recursive, canonicalizing file finding library for Unix." @@ -24,9 +24,6 @@ default-target = "x86_64-unknown-linux-gnu" [package.metadata.bashman] name = "Dowser" -bash-dir = "./" -man-dir = "./" -credits-dir = "./" [dependencies] dactyl = "0.7.*" diff --git a/README.md b/README.md index fa4b578..544699a 100644 --- a/README.md +++ b/README.md @@ -79,27 +79,3 @@ let files2: Vec:: = Dowser::default() assert_eq!(files1.len(), files2.len()); ``` - - - -## License - -See also: [CREDITS.md](CREDITS.md) - -Copyright © 2024 [Blobfolio, LLC](https://blobfolio.com) <hello@blobfolio.com> - -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 - - 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. From 384aeadf63fccc43b8523a509dbe5792334b8bb2 Mon Sep 17 00:00:00 2001 From: Josh Stoik Date: Thu, 21 Nov 2024 23:19:07 -0800 Subject: [PATCH 2/5] lints --- README.md | 10 ++-------- benches/extension.rs | 2 +- src/ext.rs | 10 +++++----- src/lib.rs | 10 ++-------- 4 files changed, 10 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 544699a..fed9d17 100644 --- a/README.md +++ b/README.md @@ -60,10 +60,7 @@ assert_eq!(files1.len(), files2.len()); let files1: Vec:: = 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(); @@ -71,10 +68,7 @@ let files1: Vec:: = Dowser::default() let files2: Vec:: = 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()); diff --git a/benches/extension.rs b/benches/extension.rs index ab81214..3962aa8 100644 --- a/benches/extension.rs +++ b/benches/extension.rs @@ -20,7 +20,7 @@ fn test_std

(path: P) -> bool where P: AsRef { 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. diff --git a/src/ext.rs b/src/ext.rs index 3ed76cc..5012f39 100644 --- a/src/ext.rs +++ b/src/ext.rs @@ -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!()); /// ``` /// @@ -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 { @@ -196,7 +196,7 @@ where P: AsRef { 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)) } } diff --git a/src/lib.rs b/src/lib.rs index c399222..281a395 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -50,10 +50,7 @@ assert_eq!(files1.len(), files2.len()); let files1: Vec:: = 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(); @@ -61,10 +58,7 @@ let files1: Vec:: = Dowser::default() let files2: Vec:: = 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()); From d4b798212f458bac8ae3c3287d435260979ada67 Mon Sep 17 00:00:00 2001 From: Josh Stoik Date: Thu, 28 Nov 2024 11:16:24 -0800 Subject: [PATCH 3/5] bump: brunch 0.7 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1c6417f..7b357a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ version = "0.8.*" default-features = false [dev-dependencies] -brunch = "0.6.*" +brunch = "0.7.*" [[bench]] name = "dowser" From 916a9e7b7723dd26c6c10f5a3b19460f16c0817b Mon Sep 17 00:00:00 2001 From: Josh Stoik Date: Thu, 28 Nov 2024 11:16:30 -0800 Subject: [PATCH 4/5] bump: dactyl 0.8 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7b357a2..0178b53 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ default-target = "x86_64-unknown-linux-gnu" name = "Dowser" [dependencies] -dactyl = "0.7.*" +dactyl = "0.8.*" [dependencies.ahash] version = "0.8.*" From a9d39c67b7d37b69f8203099d082ccbae2f4f25c Mon Sep 17 00:00:00 2001 From: Josh Stoik Date: Thu, 28 Nov 2024 11:19:20 -0800 Subject: [PATCH 5/5] bump: 0.10.1 --- CHANGELOG.md | 10 ++++++++++ CREDITS.md | 26 ++++++++++++++++++++------ Cargo.toml | 2 +- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8062482..4174973 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/CREDITS.md b/CREDITS.md index 49c70ab..ae55508 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -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:tom.kaitchuck@gmail.com) | Apache-2.0 or MIT | -| [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:alex@alexcrichton.com) | Apache-2.0 or MIT | -| [dactyl](https://github.com/Blobfolio/dactyl) | 0.7.4 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL | -| [zerocopy](https://github.com/google/zerocopy) | 0.7.35 | [Joshua Liebow-Feeser](mailto:joshlf@google.com) | Apache-2.0, BSD-2-Clause, or MIT | +| [**ahash**](https://github.com/tkaitchuck/ahash) | 0.8.11 | [Tom Kaitchuck](mailto:tom.kaitchuck@gmail.com) | MIT OR Apache-2.0 | +| [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:alex@alexcrichton.com) | MIT OR Apache-2.0 | +| [**dactyl**](https://github.com/Blobfolio/dactyl) | 0.8.0 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL | +| [version_check](https://github.com/SergioBenitez/version_check) ⚒️ | 0.9.5 | [Sergio Benitez](mailto:sb@sergio.bz) | MIT OR Apache-2.0 | +| [zerocopy](https://github.com/google/zerocopy) | 0.7.35 | [Joshua Liebow-Feeser](mailto:joshlf@google.com) | BSD-2-Clause OR Apache-2.0 OR MIT | +| [zerocopy-derive](https://github.com/google/zerocopy) | 0.7.35 | [Joshua Liebow-Feeser](mailto:joshlf@google.com) | BSD-2-Clause OR Apache-2.0 OR MIT | +| [_once_cell_](https://github.com/matklad/once_cell) | 1.20.2 | [Aleksey Kladov](mailto:aleksey.kladov@gmail.com) | MIT OR Apache-2.0 | +| [_proc-macro2_](https://github.com/dtolnay/proc-macro2) ⚒️ | 1.0.92 | [David Tolnay](mailto:dtolnay@gmail.com) and [Alex Crichton](mailto:alex@alexcrichton.com) | MIT OR Apache-2.0 | +| [_quote_](https://github.com/dtolnay/quote) ⚒️ | 1.0.37 | [David Tolnay](mailto:dtolnay@gmail.com) | MIT OR Apache-2.0 | +| [_syn_](https://github.com/dtolnay/syn) ⚒️ | 2.0.89 | [David Tolnay](mailto:dtolnay@gmail.com) | MIT OR Apache-2.0 | +| [_unicode-ident_](https://github.com/dtolnay/unicode-ident) ⚒️ | 1.0.14 | [David Tolnay](mailto:dtolnay@gmail.com) | (MIT OR Apache-2.0) AND Unicode-3.0 | + +### Legend + +* **Direct Dependency** +* Child Dependency +* _Optional Dependency_ +* ⚒️ Build-Only diff --git a/Cargo.toml b/Cargo.toml index 0178b53..4db8ebe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dowser" -version = "0.10.0" +version = "0.10.1" authors = ["Josh Stoik "] edition = "2021" rust-version = "1.81"