Skip to content

Commit

Permalink
run clippy on root, another minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Feb 22, 2022
1 parent 71f539c commit 9dac965
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
name: ci result
runs-on: ubuntu-latest
needs:
- clippy
- geo_types
- geo
- geo_postgis
Expand All @@ -28,6 +29,23 @@ jobs:
if: "!success()"
run: exit 1

clippy:
name: geo-types
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
container_image:
# Use the latest stable clippy. No need for older versions.
- "georust/geo-ci:rust-1.58"
container:
image: ${{ matrix.container_image }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- run: rustup component add clippy
- run: cargo clippy --all-features --all-targets --no-default-features -- -Dwarnings

geo_types:
name: geo-types
runs-on: ubuntu-latest
Expand All @@ -52,8 +70,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
- run: cargo check --all-targets --no-default-features
- run: rustup component add clippy
- run: cargo clippy --all-targets --no-default-features -- -Dwarnings
- run: cargo test --all-features

geo:
Expand All @@ -80,8 +96,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
- run: cargo check --all-targets --no-default-features
- run: rustup component add clippy
- run: cargo clippy --all-targets --no-default-features -- -Dwarnings
# we don't want to test `proj-network` because it only enables the `proj` feature
- run: cargo test --features "use-proj use-serde"

Expand Down Expand Up @@ -109,8 +123,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
- run: cargo check --all-targets
- run: rustup component add clippy
- run: cargo clippy --all-targets -- -Dwarnings
- run: cargo test

geo_fuzz:
Expand Down
2 changes: 1 addition & 1 deletion geo/src/algorithm/map_coords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ mod test {
use proj::{Coord, Proj, ProjError};
let from = "EPSG:4326";
let to = "EPSG:2230";
let to_feet = Proj::new_known_crs(&from, &to, None).unwrap();
let to_feet = Proj::new_known_crs(from, to, None).unwrap();

let f = |x: f64, y: f64| -> Result<_, ProjError> {
let shifted = to_feet.convert((x, y))?;
Expand Down

0 comments on commit 9dac965

Please sign in to comment.