Skip to content

Commit 9433356

Browse files
authored
Merge pull request #186 from epage/template
chore: Update from _rust/main template
2 parents 36cf37e + 3907078 commit 9433356

File tree

17 files changed

+72
-54
lines changed

17 files changed

+72
-54
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[resolver]
2+
incompatible-rust-versions = "fallback"

.github/renovate.json5

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
customManagers: [
1010
{
1111
customType: 'regex',
12-
fileMatch: [
13-
'^rust-toolchain\\.toml$',
14-
'Cargo.toml$',
15-
'clippy.toml$',
16-
'\\.clippy.toml$',
17-
'^\\.github/workflows/ci.yml$',
18-
'^\\.github/workflows/rust-next.yml$',
12+
managerFilePatterns: [
13+
'/^rust-toolchain\\.toml$/',
14+
'/Cargo.toml$/',
15+
'/clippy.toml$/',
16+
'/\\.clippy.toml$/',
17+
'/^\\.github/workflows/ci.yml$/',
18+
'/^\\.github/workflows/rust-next.yml$/',
1919
],
2020
matchStrings: [
2121
'STABLE.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Build
5151
run: cargo test --workspace --no-run
5252
- name: Test
53-
run: cargo hack test --feature-powerset --workspace
53+
run: cargo hack test --each-feature --workspace
5454
msrv:
5555
name: "Check MSRV"
5656
runs-on: ubuntu-latest
@@ -64,7 +64,7 @@ jobs:
6464
- uses: Swatinem/rust-cache@v2
6565
- uses: taiki-e/install-action@cargo-hack
6666
- name: Default features
67-
run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets
67+
run: cargo hack check --each-feature --locked --rust-version --ignore-private --workspace --all-targets --keep-going
6868
minimal-versions:
6969
name: Minimal versions
7070
runs-on: ubuntu-latest
@@ -82,7 +82,7 @@ jobs:
8282
- name: Downgrade dependencies to minimal versions
8383
run: cargo +nightly generate-lockfile -Z minimal-versions
8484
- name: Compile with minimal versions
85-
run: cargo +stable check --workspace --all-features --locked
85+
run: cargo +stable check --workspace --all-features --locked --keep-going
8686
lockfile:
8787
runs-on: ubuntu-latest
8888
steps:
@@ -109,7 +109,7 @@ jobs:
109109
- name: Check documentation
110110
env:
111111
RUSTDOCFLAGS: -D warnings
112-
run: cargo doc --workspace --all-features --no-deps --document-private-items
112+
run: cargo doc --workspace --all-features --no-deps --document-private-items --keep-going
113113
rustfmt:
114114
name: rustfmt
115115
runs-on: ubuntu-latest
@@ -155,7 +155,7 @@ jobs:
155155
sarif_file: clippy-results.sarif
156156
wait-for-processing: true
157157
- name: Report status
158-
run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated
158+
run: cargo clippy --workspace --all-features --all-targets --keep-going -- -D warnings --allow deprecated
159159
coverage:
160160
name: Coverage
161161
runs-on: ubuntu-latest

.github/workflows/rust-next.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Build
4141
run: cargo test --workspace --no-run
4242
- name: Test
43-
run: cargo hack test --feature-powerset --workspace
43+
run: cargo hack test --each-feature --workspace
4444
latest:
4545
name: "Check latest dependencies"
4646
runs-on: ubuntu-latest
@@ -58,4 +58,4 @@ jobs:
5858
- name: Build
5959
run: cargo test --workspace --no-run
6060
- name: Test
61-
run: cargo hack test --feature-powerset --workspace
61+
run: cargo hack test --each-feature --workspace

.pre-commit-config.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
1+
default_install_hook_types: ["pre-commit", "commit-msg"]
12
repos:
23
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
4+
rev: v5.0.0
45
hooks:
56
- id: check-yaml
6-
stages: [commit]
77
- id: check-json
8-
stages: [commit]
98
- id: check-toml
10-
stages: [commit]
119
- id: check-merge-conflict
12-
stages: [commit]
1310
- id: check-case-conflict
14-
stages: [commit]
1511
- id: detect-private-key
16-
stages: [commit]
1712
- repo: https://github.com/crate-ci/typos
18-
rev: v1.16.20
13+
rev: v1.32.0
1914
hooks:
2015
- id: typos
21-
stages: [commit]
2216
- repo: https://github.com/crate-ci/committed
23-
rev: v1.0.20
17+
rev: v1.1.7
2418
hooks:
2519
- id: committed
26-
stages: [commit-msg]

CONTRIBUTING.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ appreciate any level you're willing to do.
77

88
Need some new functionality to help? You can let us know by opening an
99
[issue][new issue]. It's helpful to look through [all issues][all issues] in
10-
case its already being talked about.
10+
case it's already being talked about.
1111

1212
## Bug Reports
1313

1414
Please let us know about what problems you run into, whether in behavior or
1515
ergonomics of API. You can do this by opening an [issue][new issue]. It's
16-
helpful to look through [all issues][all issues] in case its already being
16+
helpful to look through [all issues][all issues] in case it's already being
1717
talked about.
1818

1919
## Pull Requests
2020

21-
Looking for an idea? Check our [issues][issues]. If it's look more open ended,
21+
Looking for an idea? Check our [issues][issues]. If the issue looks open ended,
2222
it is probably best to post on the issue how you are thinking of resolving the
2323
issue so you can get feedback early in the process. We want you to be
2424
successful and it can be discouraging to find out a lot of re-work is needed.
@@ -41,15 +41,18 @@ As a heads up, we'll be running your PR through the following gauntlet:
4141
Not everything can be checked automatically though.
4242

4343
We request that the commit history gets cleaned up.
44+
4445
We ask that commits are atomic, meaning they are complete and have a single responsibility.
45-
PRs should tell a cohesive story, with test and refactor commits that keep the
46+
A complete commit should build, pass tests, update documentation and tests, and not have dead code.
47+
48+
PRs should tell a cohesive story, with refactor and test commits that keep the
4649
fix or feature commits simple and clear.
4750

4851
Specifically, we would encourage
4952
- File renames be isolated into their own commit
50-
- Add tests in a commit before their feature or fix, showing the current behavior.
53+
- Add tests in a commit before their feature or fix, showing the current behavior (i.e. they should pass).
5154
The diff for the feature/fix commit will then show how the behavior changed,
52-
making it clearer to reviewers and the community and showing people that the
55+
making the commit's intent clearer to reviewers and the community, and showing people that the
5356
test is verifying the expected state.
5457
- e.g. [clap#5520](https://github.com/clap-rs/clap/pull/5520)
5558

Cargo.toml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ include = [
1111
"build.rs",
1212
"src/**/*",
1313
"Cargo.toml",
14+
"Cargo.lock",
1415
"LICENSE*",
1516
"README.md",
16-
"benches/**/*",
1717
"examples/**/*"
1818
]
1919

2020
[workspace.lints.rust]
2121
rust_2018_idioms = { level = "warn", priority = -1 }
22+
unnameable_types = "warn"
2223
unreachable_pub = "warn"
2324
unsafe_op_in_unsafe_fn = "warn"
2425
unused_lifetimes = "warn"
@@ -61,7 +62,7 @@ lossy_float_literal = "warn"
6162
macro_use_imports = "warn"
6263
mem_forget = "warn"
6364
mutex_integer = "warn"
64-
needless_continue = "warn"
65+
needless_continue = "allow"
6566
needless_for_each = "warn"
6667
negative_feature_names = "warn"
6768
path_buf_push_overwrite = "warn"
@@ -86,6 +87,15 @@ verbose_file_reads = "warn"
8687
wildcard_imports = "warn"
8788
zero_sized_map_values = "warn"
8889

90+
[profile.dev]
91+
panic = "abort"
92+
93+
[profile.release]
94+
panic = "abort"
95+
codegen-units = 1
96+
lto = true
97+
# debug = "line-tables-only" # requires Cargo 1.71
98+
8999
[package]
90100
name = "predicates"
91101
version = "3.1.3"

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ For more information on using predicates, look at the
3131

3232
## License
3333

34-
`predicates-rs` is distributed under the terms of both the MIT license and the
35-
Apache License (Version 2.0).
34+
Licensed under either of
3635

3736
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
3837
* MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
3938

39+
at your option.
40+
4041
## Credits
4142

4243
Big thanks to [futures-rs](https://github.com/alexcrichton/futures-rs), whose

crates/core/Cargo.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@
22
name = "predicates-core"
33
version = "1.0.9"
44
description = "An API for boolean-valued predicate functions."
5-
authors = ["Nick Stevens <nick@bitcurry.com>"]
6-
readme = "README.md"
7-
repository = "https://github.com/assert-rs/predicates-rs/tree/master/crates/core"
8-
homepage = "https://github.com/assert-rs/predicates-rs/tree/master/crates/core"
9-
documentation = "https://docs.rs/predicates-core"
105
categories = ["data-structures", "rust-patterns"]
116
keywords = ["predicate", "boolean", "combinatorial", "match", "logic"]
7+
repository.workspace = true
128
license.workspace = true
139
edition.workspace = true
1410
rust-version.workspace = true
1511
include.workspace = true
1612

1713
[package.metadata.docs.rs]
1814
all-features = true
19-
rustdoc-args = ["--cfg", "docsrs"]
15+
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
2016

2117
[package.metadata.release]
2218
pre-release-replacements = [

crates/core/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212

1313
## License
1414

15-
`predicates-core` is distributed under the terms of both the MIT license and the
16-
Apache License (Version 2.0).
15+
Licensed under either of
1716

18-
See LICENSE-APACHE, and LICENSE-MIT for details.
17+
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
18+
* MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
1919

20+
at your option.
2021

2122
## Credits
2223

0 commit comments

Comments
 (0)