Skip to content

Commit

Permalink
Merge pull request #44 from glotzerlab/test-rust-1.81
Browse files Browse the repository at this point in the history
Test with Rust 1.81.0.
  • Loading branch information
joaander authored Sep 9, 2024
2 parents 2fb981c + 1ec8b14 commit 0ac6f53
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
workflow_dispatch:

env:
RUST_VERSION: 1.80.0
RUST_VERSION: 1.81.0

jobs:
pre-commit:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env:
name: row
CARGO_TERM_COLOR: always
CLICOLOR: 1
RUST_VERSION: 1.80.0
RUST_VERSION: 1.81.0

jobs:
source:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
CARGO_TERM_COLOR: always
ROW_COLOR: always
CLICOLOR: 1
RUST_LATEST_VERSION: 1.80.0
RUST_LATEST_VERSION: 1.81.0

jobs:
unit_test:
Expand All @@ -34,14 +34,14 @@ jobs:
rust:
# Oldest supported version of rust
- 1.77.2
- 1.80.0
- 1.81.0
mode:
- debug

include:
# Add a release build on linux with the latest version of rust
- os: ubuntu-22.04
rust: 1.80.0
rust: 1.81.0
mode: release

steps:
Expand Down Expand Up @@ -126,6 +126,7 @@ jobs:
with:
args: -n
--exclude https://glotzerlab.engin.umich.edu
--exclude https://arc.umich.edu
--exclude 'https://github.com/glotzerlab/row/edit.*'
--exclude doi.org
'./**/*.md'
Expand Down
2 changes: 2 additions & 0 deletions .ignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
!/workflow.toml
!/.ignore
!/*.yaml
!/.github
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ci:
skip: [fmt, check, clippy]

default_language_version:
rust: 1.80.0
rust: 1.81.0

repos:
- repo: https://github.com/backplane/pre-commit-rust-hooks
Expand Down
42 changes: 7 additions & 35 deletions src/workflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,47 +416,27 @@ impl Resources {
impl Action {
/// Get the action's `name`.
pub fn name(&self) -> &str {
if let Some(name) = self.name.as_ref() {
name
} else {
""
}
self.name.as_deref().unwrap_or("")
}

/// Get the action's `command`.
pub fn command(&self) -> &str {
if let Some(command) = self.command.as_ref() {
command
} else {
""
}
self.command.as_deref().unwrap_or("")
}

/// Get the action's `launchers`.
pub fn launchers(&self) -> &[String] {
if let Some(launchers) = self.launchers.as_ref() {
launchers
} else {
&[]
}
self.launchers.as_deref().unwrap_or(&[])
}

/// Get the action's `previous_actions`.
pub fn previous_actions(&self) -> &[String] {
if let Some(previous_actions) = self.previous_actions.as_ref() {
previous_actions
} else {
&[]
}
self.previous_actions.as_deref().unwrap_or(&[])
}

/// Get the action's products
pub fn products(&self) -> &[String] {
if let Some(products) = self.products.as_ref() {
products
} else {
&[]
}
self.products.as_deref().unwrap_or(&[])
}

/// Resolve the action's omitted keys with defaults
Expand Down Expand Up @@ -512,20 +492,12 @@ impl Action {
impl Group {
/// Get the group's `include`.
pub fn include(&self) -> &[Selector] {
if let Some(include) = self.include.as_ref() {
include
} else {
&[]
}
self.include.as_deref().unwrap_or(&[])
}

/// Get the group's `sort_by`.
pub fn sort_by(&self) -> &[String] {
if let Some(sort_by) = self.sort_by.as_ref() {
sort_by
} else {
&[]
}
self.sort_by.as_deref().unwrap_or(&[])
}

/// Get the group's `split_by_sort_key`.
Expand Down

0 comments on commit 0ac6f53

Please sign in to comment.