Skip to content

Commit 90c417e

Browse files
authored
Merge pull request #30 from glotzerlab/test-rust-1.80
Test rust 1.80.
2 parents a0ca810 + a8f756a commit 90c417e

File tree

5 files changed

+19
-32
lines changed

5 files changed

+19
-32
lines changed

.github/workflows/pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
workflow_dispatch:
1414

1515
env:
16-
RUST_VERSION: 1.78.0
16+
RUST_VERSION: 1.80.0
1717

1818
jobs:
1919
pre-commit:

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ env:
2626
name: row
2727
CARGO_TERM_COLOR: always
2828
CLICOLOR: 1
29-
RUST_VERSION: 1.78.0
29+
RUST_VERSION: 1.80.0
3030

3131
jobs:
3232
source:
@@ -172,7 +172,7 @@ jobs:
172172
~/.cargo/registry/cache/
173173
~/.cargo/git/db/
174174
target/
175-
key: ${{ runner.os }}-rust-${{ env.RUST_VERSION }}-cargo-publish-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
175+
key: ${{ runner.os }}-rust-${{ env.RUST_VERSION }}-cargo-publish-${{ hashFiles('**/Cargo.lock') }}
176176
- name: Dry run
177177
run: cargo publish --all-features --dry-run
178178
- name: Publish to crates.io

.github/workflows/test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020
CARGO_TERM_COLOR: always
2121
ROW_COLOR: always
2222
CLICOLOR: 1
23-
RUST_LATEST_VERSION: 1.78.0
23+
RUST_LATEST_VERSION: 1.80.0
2424

2525
jobs:
2626
unit_test:
@@ -34,14 +34,14 @@ jobs:
3434
rust:
3535
# Oldest supported version of rust
3636
- 1.77.2
37-
- 1.78.0
37+
- 1.80.0
3838
mode:
3939
- debug
4040

4141
include:
4242
# Add a release build on linux with the latest version of rust
4343
- os: ubuntu-22.04
44-
rust: 1.78.0
44+
rust: 1.80.0
4545
mode: release
4646

4747
steps:

.pre-commit-config.yaml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ ci:
22
autoupdate_schedule: quarterly
33
autoupdate_branch: 'trunk'
44
autofix_prs: false
5-
# rust does not work on pre-commit.ci: could not create temp file /opt/rust/rustup/tmp/17c53uaz8kdwrx0k_file: Read-only file system
6-
skip: [fmt, cargo-check, clippy]
5+
# rust does not work on pre-commit.ci
6+
skip: [fmt, check, clippy]
77

88
default_language_version:
9-
rust: 1.78.0
9+
rust: 1.80.0
1010

1111
repos:
12-
- repo: https://github.com/Young-Naive-Simple/pre-commit-rust/
13-
rev: 3a8de64acc969112746489e5ec1f0b13e00d871e
12+
- repo: https://github.com/backplane/pre-commit-rust-hooks
13+
rev: v1.1.0
1414
hooks:
1515
- id: fmt
16-
- id: cargo-check
16+
- id: check
1717
- id: clippy
1818
args:
1919
- --all-targets
@@ -30,11 +30,10 @@ repos:
3030
- id: check-yaml
3131
- id: check-case-conflict
3232
- id: mixed-line-ending
33-
# fails with _cgo_export.c:3:10: fatal error: 'stdlib.h' file not found on Mac.
34-
# - repo: https://github.com/rhysd/actionlint
35-
# rev: v1.6.27
36-
# hooks:
37-
# - id: actionlint
33+
- repo: https://github.com/rhysd/actionlint
34+
rev: v1.7.1
35+
hooks:
36+
- id: actionlint
3837
- repo: https://github.com/astral-sh/ruff-pre-commit
3938
rev: 'v0.5.0'
4039
hooks:

src/workflow.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -530,29 +530,17 @@ impl Group {
530530

531531
/// Get the group's `split_by_sort_key`.
532532
pub fn split_by_sort_key(&self) -> bool {
533-
if let Some(split_by_sort_key) = self.split_by_sort_key {
534-
split_by_sort_key
535-
} else {
536-
false
537-
}
533+
self.split_by_sort_key.unwrap_or_default()
538534
}
539535

540536
/// Get the group's `reverse_sort`.
541537
pub fn reverse_sort(&self) -> bool {
542-
if let Some(reverse_sort) = self.reverse_sort {
543-
reverse_sort
544-
} else {
545-
false
546-
}
538+
self.reverse_sort.unwrap_or_default()
547539
}
548540

549541
/// Get the group's `submit_whole`.
550542
pub fn submit_whole(&self) -> bool {
551-
if let Some(submit_whole) = self.submit_whole {
552-
submit_whole
553-
} else {
554-
false
555-
}
543+
self.submit_whole.unwrap_or_default()
556544
}
557545

558546
/// Resolve omitted keys from the given template.

0 commit comments

Comments
 (0)