Skip to content

Commit

Permalink
Merge branch 'rust-transit:main' into allow-clone
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin authored Mar 21, 2024
2 parents b4eaf51 + cd0e818 commit af868c7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 32 deletions.
37 changes: 9 additions & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
Expand All @@ -17,40 +17,21 @@ jobs:
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
- uses: actions-rs/cargo@v1 # we also test without the default `read-url` feature
with:
command: test
args: --no-default-features
- uses: dtolnay/rust-toolchain@stable
- run: test --all-features
- run: cargo test --no-default-features

lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

run: cargo fmt --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
run: cargo clippy -- -D warnings
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
description = "Read GTFS (public transit timetables) files"
name = "gtfs-structures"
version = "0.41.0"
version = "0.41.1"
authors = ["Tristram Gräbener <[email protected]>", "Antoine Desbordes <[email protected]>"]
repository = "https://github.com/rust-transit/gtfs-structure"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/gtfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl Gtfs {
/// Reads the GTFS from a local zip archive or local directory
pub fn from_path<P>(path: P) -> Result<Gtfs, Error>
where
P: AsRef<std::path::Path> + std::fmt::Display,
P: AsRef<std::path::Path>,
{
RawGtfs::from_path(path).and_then(Gtfs::try_from)
}
Expand Down
2 changes: 1 addition & 1 deletion src/gtfs_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl RawGtfsReader {
/// Reads the raw GTFS from a local zip archive or local directory
pub fn read_from_path<P>(&self, path: P) -> Result<RawGtfs, Error>
where
P: AsRef<Path> + std::fmt::Display,
P: AsRef<Path>,
{
let p = path.as_ref();
if p.is_file() {
Expand Down
2 changes: 1 addition & 1 deletion src/raw_gtfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl RawGtfs {
/// Reads the raw GTFS from a local zip archive or local directory
pub fn from_path<P>(path: P) -> Result<Self, Error>
where
P: AsRef<Path> + std::fmt::Display,
P: AsRef<Path>,
{
GtfsReader::default().raw().read_from_path(path)
}
Expand Down

0 comments on commit af868c7

Please sign in to comment.