Skip to content

Commit 0ece75c

Browse files
authored
Merge pull request #133 from epage/template
chore: Update from _rust/main template
2 parents 64ea9bd + e47b74c commit 0ece75c

File tree

9 files changed

+37
-38
lines changed

9 files changed

+37
-38
lines changed

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[resolver]
2+
incompatible-rust-versions = "fallback"
3+
14
[target.x86_64-pc-windows-msvc]
25
rustflags = ["-Ctarget-feature=+crt-static"]
36

.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: 4 additions & 4 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
lockfile:
6969
runs-on: ubuntu-latest
7070
steps:
@@ -91,7 +91,7 @@ jobs:
9191
- name: Check documentation
9292
env:
9393
RUSTDOCFLAGS: -D warnings
94-
run: cargo doc --workspace --all-features --no-deps --document-private-items
94+
run: cargo doc --workspace --all-features --no-deps --document-private-items --keep-going
9595
rustfmt:
9696
name: rustfmt
9797
runs-on: ubuntu-latest
@@ -137,7 +137,7 @@ jobs:
137137
sarif_file: clippy-results.sarif
138138
wait-for-processing: true
139139
- name: Report status
140-
run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated
140+
run: cargo clippy --workspace --all-features --all-targets --keep-going -- -D warnings --allow deprecated
141141
coverage:
142142
name: Coverage
143143
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]

Cargo.toml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ include = [
1616
"Cargo.lock",
1717
"LICENSE*",
1818
"README.md",
19-
"benches/**/*",
2019
"examples/**/*"
2120
]
2221

2322
[workspace.lints.rust]
2423
rust_2018_idioms = { level = "warn", priority = -1 }
24+
unnameable_types = "warn"
2525
unreachable_pub = "warn"
2626
unsafe_op_in_unsafe_fn = "warn"
2727
unused_lifetimes = "warn"
@@ -64,7 +64,7 @@ lossy_float_literal = "warn"
6464
macro_use_imports = "warn"
6565
mem_forget = "warn"
6666
mutex_integer = "warn"
67-
needless_continue = "warn"
67+
needless_continue = "allow"
6868
needless_for_each = "warn"
6969
negative_feature_names = "warn"
7070
path_buf_push_overwrite = "warn"
@@ -89,6 +89,15 @@ verbose_file_reads = "warn"
8989
wildcard_imports = "warn"
9090
zero_sized_map_values = "warn"
9191

92+
[profile.dev]
93+
panic = "abort"
94+
95+
[profile.release]
96+
panic = "abort"
97+
codegen-units = 1
98+
lto = true
99+
# debug = "line-tables-only" # requires Cargo 1.71
100+
92101
[package]
93102
name = "git-branch-stash-cli"
94103
description = "Manage snapshots of your working directory"
@@ -135,12 +144,5 @@ git2 = { version = ">=0.16, <=0.20", default-features = false, features = ["vend
135144
serde_json = "1.0.116"
136145
itertools = "0.14.0"
137146

138-
[profile.dev]
139-
panic = "abort"
140-
141-
[profile.release]
142-
panic = "abort"
143-
codegen-units = 1
144-
145147
[lints]
146148
workspace = true

crates/git-branch-stash/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
name = "git-branch-stash"
33
description = "Manage snapshots of your working directory"
44
version = "0.10.1"
5-
documentation = "https://github.com/gitext-rs/git-branch-stash.git"
65
categories = ["command-line-interface", "development-tools"]
76
keywords = ["git", "cli"]
8-
license.workspace = true
97
repository.workspace = true
8+
license.workspace = true
109
edition.workspace = true
1110
rust-version.workspace = true
1211
include.workspace = true

crates/git-branch-stash/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
pub mod config;
66

7-
pub use git::*;
8-
pub use snapshot::*;
9-
pub use stack::*;
7+
pub use git::GitRepo;
8+
pub use snapshot::Branch;
9+
pub use snapshot::Snapshot;
10+
pub use stack::Stack;
1011

1112
mod git;
1213
mod snapshot;

deny.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ allow = [
9494
"CC0-1.0",
9595
"ISC",
9696
"OpenSSL",
97+
"Zlib",
9798
]
9899
# The confidence threshold for detecting a license from license text.
99100
# The higher the value, the more closely the license text must be to the

0 commit comments

Comments
 (0)