Skip to content

Commit c25eac8

Browse files
committedSep 9, 2023
Merge branch 'master' into feat/contains-all
2 parents 45d4a17 + 2203420 commit c25eac8

26 files changed

+640
-148
lines changed
 

‎.clippy.toml

+13-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
msrv = "1.64.0" # MSRV
1+
msrv = "1.69.0" # MSRV
2+
warn-on-all-wildcard-imports = true
3+
allow-expect-in-tests = true
4+
allow-unwrap-in-tests = true
5+
allow-dbg-in-tests = true
6+
disallowed-methods = [
7+
{ path = "std::option::Option::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" },
8+
{ path = "std::option::Option::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" },
9+
{ path = "std::result::Result::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" },
10+
{ path = "std::result::Result::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" },
11+
{ path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects" },
12+
{ path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects" },
13+
]

‎.github/renovate.json5

+85-27
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,103 @@
11
{
2-
"schedule": [
3-
"before 3am on the first day of the month"
2+
schedule: [
3+
'before 5am on the first day of the month',
44
],
5-
"semanticCommits": "enabled",
6-
"configMigration": true,
7-
"packageRules": [
5+
semanticCommits: 'enabled',
6+
configMigration: true,
7+
dependencyDashboard: true,
8+
regexManagers: [
9+
{
10+
customType: 'regex',
11+
fileMatch: [
12+
'^rust-toolchain\\.toml$',
13+
'Cargo.toml$',
14+
'clippy.toml$',
15+
'\\.clippy.toml$',
16+
'^\\.github/workflows/ci.yml$',
17+
'^\\.github/workflows/rust-next.yml$',
18+
],
19+
matchStrings: [
20+
'MSRV.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
21+
'(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?MSRV',
22+
],
23+
depNameTemplate: 'rust',
24+
packageNameTemplate: 'rust-lang/rust',
25+
datasourceTemplate: 'github-releases',
26+
},
27+
],
28+
packageRules: [
29+
{
30+
commitMessageTopic: 'MSRV',
31+
matchManagers: [
32+
'regex',
33+
],
34+
matchPackageNames: [
35+
'rust',
36+
],
37+
minimumReleaseAge: '126 days', // 3 releases * 6 weeks per release * 7 days per week
38+
internalChecksFilter: 'strict',
39+
},
840
// Goals:
941
// - Keep version reqs low, ignoring compatible normal/build dependencies
1042
// - Take advantage of latest dev-dependencies
1143
// - Rollup safe upgrades to reduce CI runner load
1244
// - Help keep number of versions down by always using latest breaking change
1345
// - Have lockfile and manifest in-sync
1446
{
15-
"matchManagers": ["cargo"],
16-
"matchDepTypes": ["build-dependencies", "dependencies"],
17-
"matchCurrentVersion": ">=0.1.0",
18-
"matchUpdateTypes": ["patch"],
19-
"enabled": false,
47+
matchManagers: [
48+
'cargo',
49+
],
50+
matchDepTypes: [
51+
'build-dependencies',
52+
'dependencies',
53+
],
54+
matchCurrentVersion: '>=0.1.0',
55+
matchUpdateTypes: [
56+
'patch',
57+
],
58+
enabled: false,
2059
},
2160
{
22-
"matchManagers": ["cargo"],
23-
"matchDepTypes": ["build-dependencies", "dependencies"],
24-
"matchCurrentVersion": ">=1.0.0",
25-
"matchUpdateTypes": ["minor"],
26-
"enabled": false,
61+
matchManagers: [
62+
'cargo',
63+
],
64+
matchDepTypes: [
65+
'build-dependencies',
66+
'dependencies',
67+
],
68+
matchCurrentVersion: '>=1.0.0',
69+
matchUpdateTypes: [
70+
'minor',
71+
],
72+
enabled: false,
2773
},
2874
{
29-
"matchManagers": ["cargo"],
30-
"matchDepTypes": ["dev-dependencies"],
31-
"matchCurrentVersion": ">=0.1.0",
32-
"matchUpdateTypes": ["patch"],
33-
"automerge": true,
34-
"groupName": "compatible (dev)",
75+
matchManagers: [
76+
'cargo',
77+
],
78+
matchDepTypes: [
79+
'dev-dependencies',
80+
],
81+
matchCurrentVersion: '>=0.1.0',
82+
matchUpdateTypes: [
83+
'patch',
84+
],
85+
automerge: true,
86+
groupName: 'compatible (dev)',
3587
},
3688
{
37-
"matchManagers": ["cargo"],
38-
"matchDepTypes": ["dev-dependencies"],
39-
"matchCurrentVersion": ">=1.0.0",
40-
"matchUpdateTypes": ["minor"],
41-
"automerge": true,
42-
"groupName": "compatible (dev)",
89+
matchManagers: [
90+
'cargo',
91+
],
92+
matchDepTypes: [
93+
'dev-dependencies',
94+
],
95+
matchCurrentVersion: '>=1.0.0',
96+
matchUpdateTypes: [
97+
'minor',
98+
],
99+
automerge: true,
100+
groupName: 'compatible (dev)',
43101
},
44102
],
45103
}

‎.github/settings.yml

+17-10
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
11
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
22

33
repository:
4-
description: Boolean-valued predicate functions in Rust
5-
homepage: docs.rs/predicates
6-
topics: rust test predicates
4+
description: "Boolean-valued predicate functions in Rust"
5+
homepage: "docs.rs/predicates"
6+
topics: "rust test predicates"
77
has_issues: true
88
has_projects: false
99
has_wiki: false
1010
has_downloads: true
1111
default_branch: master
1212

13-
allow_squash_merge: true
13+
# Preference: people do clean commits
1414
allow_merge_commit: true
15-
allow_rebase_merge: true
15+
# Backup in case we need to clean up commits
16+
allow_squash_merge: true
17+
# Not really needed
18+
allow_rebase_merge: false
1619

17-
# Manual: allow_auto_merge: true, see https://github.com/probot/settings/issues/402
20+
allow_auto_merge: true
1821
delete_branch_on_merge: true
1922

23+
squash_merge_commit_title: "PR_TITLE"
24+
squash_merge_commit_message: "PR_BODY"
25+
merge_commit_message: "PR_BODY"
26+
2027
labels:
2128
# Type
2229
- name: bug
2330
color: '#b60205'
24-
description: Not as expected
31+
description: "Not as expected"
2532
- name: enhancement
2633
color: '#1d76db'
27-
description: Improve the expected
34+
description: "Improve the expected"
2835
# Flavor
2936
- name: question
3037
color: "#cc317c"
31-
description: Uncertainty is involved
38+
description: "Uncertainty is involved"
3239
- name: breaking-change
3340
color: "#e99695"
3441
- name: good first issue
3542
color: '#c2e0c6'
36-
description: Help wanted!
43+
description: "Help wanted!"
3744

3845
branches:
3946
- name: master

‎.github/workflows/audit.yml

+33-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,49 @@
11
name: Security audit
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
pull_request:
48
paths:
59
- '**/Cargo.toml'
610
- '**/Cargo.lock'
711
push:
8-
paths:
9-
- '**/Cargo.toml'
10-
- '**/Cargo.lock'
11-
schedule:
12-
- cron: '16 16 16 * *'
12+
branches:
13+
- master
14+
15+
env:
16+
RUST_BACKTRACE: 1
17+
CARGO_TERM_COLOR: always
18+
CLICOLOR: 1
19+
1320
jobs:
1421
security_audit:
22+
permissions:
23+
issues: write # to create issues (actions-rs/audit-check)
24+
checks: write # to create check (actions-rs/audit-check)
1525
runs-on: ubuntu-latest
26+
# Prevent sudden announcement of a new advisory from failing ci:
27+
continue-on-error: true
1628
steps:
1729
- name: Checkout repository
1830
uses: actions/checkout@v3
1931
- uses: actions-rs/audit-check@v1
2032
with:
2133
token: ${{ secrets.GITHUB_TOKEN }}
34+
35+
cargo_deny:
36+
permissions:
37+
issues: write # to create issues (actions-rs/audit-check)
38+
checks: write # to create check (actions-rs/audit-check)
39+
runs-on: ubuntu-latest
40+
strategy:
41+
matrix:
42+
checks:
43+
- bans licenses sources
44+
steps:
45+
- uses: actions/checkout@v3
46+
- uses: EmbarkStudios/cargo-deny-action@v1
47+
with:
48+
command: check ${{ matrix.checks }}
49+
rust-version: stable

0 commit comments

Comments
 (0)
Failed to load comments.