Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
codeart1st committed Jul 21, 2024
2 parents 7ca7efd + 19efc5c commit c88c235
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 47 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository and submodules
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
submodules: recursive

Expand All @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository and submodules
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
submodules: recursive

Expand All @@ -72,7 +72,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository and submodules
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
submodules: recursive

Expand All @@ -86,7 +86,7 @@ jobs:
wasm-pack build --release --target nodejs -d pkg/node -- --features wasm
- name: Upload wasm-pack build output
uses: actions/[email protected].3
uses: actions/[email protected].4
with:
name: wasm-pack-build
path: pkg
Expand All @@ -103,7 +103,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository and submodules
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
submodules: recursive

Expand All @@ -128,18 +128,18 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository and submodules
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
submodules: recursive

- name: Download wasm-pack build output
uses: actions/[email protected].7
uses: actions/[email protected].8
with:
name: wasm-pack-build
path: pkg

- name: Setup node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version: "lts/*"

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout repository and submodules
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
submodules: recursive
fetch-depth: 0
Expand All @@ -33,13 +33,13 @@ jobs:
uses: ./.github/actions/prepare-build-env

- name: Download wasm-pack build output
uses: actions/[email protected].7
uses: actions/[email protected].8
with:
name: wasm-pack-build
path: pkg

- name: Setup node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version: "lts/*"

Expand Down
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ wasm = ["wasm-bindgen", "serde-wasm-bindgen", "js-sys", "geojson", "serde"]

[dependencies]
geo-types = "0.7"
prost = { version = "0.12", default-features = false, features = ["prost-derive"] }
prost = { version = "0.13", default-features = false, features = ["prost-derive", "std"] }
wasm-bindgen = { version = "0.2", optional = true }
serde-wasm-bindgen = { version = "0.6", optional = true }
js-sys = { version = "0.3", optional = true }
geojson = { version = "0.24", optional = true }
serde = { version = "1.0", optional = true }

[dev-dependencies]
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"
prost = { version = "0.12.6" } # for testing we need default-features to be enabled
serde = { version = "1.0.204", features = ["derive"] }
serde_json = "1.0.120"
prost = { version = "0.13.1" } # for testing we need default-features to be enabled

[build-dependencies]
prost-build = "0.12.6"
prost-build = "0.13.1"
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
},
"devDependencies": {
"semantic-release-replace-plugin": "1.2.7",
"@semantic-release-cargo/semantic-release-cargo": "2.3.20",
"@semantic-release-cargo/semantic-release-cargo": "2.3.39",
"@semantic-release/git": "10.0.1",
"@semantic-release/github": "10.0.5",
"@semantic-release/github": "10.1.1",
"jest": "29.7.0",
"semantic-release": "24.0.0"
},
Expand Down
8 changes: 4 additions & 4 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,16 @@ impl std::error::Error for GeometryError {}
/// An error indicating a decoding failure during the parsing of a vector tile.
#[derive(Debug)]
pub struct DecodeError {
source: prost::DecodeError,
source: Box<dyn std::error::Error>,
}

impl DecodeError {
/// Creates a new DecodeError instance with the provided decoding error source from prost.
/// Creates a new DecodeError instance with the provided decoding error from prost.
///
/// # Arguments
///
/// * source - The underlying decoding error source from prost.
pub fn new(source: prost::DecodeError) -> Self {
/// * source - The underlying decoding error from prost.
pub fn new(source: Box<dyn std::error::Error>) -> Self {
Self { source }
}
}
Expand Down
10 changes: 8 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ impl Reader {
pub fn new(data: Vec<u8>) -> Result<Self, error::ParserError> {
match Tile::decode(Bytes::from(data)) {
Ok(tile) => Ok(Self { tile }),
Err(error) => Err(error::ParserError::new(error::DecodeError::new(error))),
Err(error) => Err(error::ParserError::new(error::DecodeError::new(Box::new(
error,
)))),
}
}

Expand Down Expand Up @@ -204,7 +206,11 @@ impl Reader {
properties: Some(parsed_tags),
});
}
Err(error) => return Err(error::ParserError::new(error::DecodeError::new(error))),
Err(error) => {
return Err(error::ParserError::new(error::DecodeError::new(Box::new(
error,
))))
}
}
}
}
Expand Down

0 comments on commit c88c235

Please sign in to comment.