Skip to content

Commit

Permalink
Update to libcnb 0.8.0 (#82)
Browse files Browse the repository at this point in the history
* Update to libcnb 0.8.0

* Update CHANGELOG
  • Loading branch information
Malax authored Jun 24, 2022
1 parent 2003c66 commit e2660d1
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 161 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Remove incorrect error message shown in the case of internal buildpack regex errors ([#77](https://github.com/heroku/procfile-cnb/pull/77)).
- Updated `libcnb` and `libherokubuildpack` from 0.5.0 to 0.7.0 ([#49](https://github.com/heroku/procfile-cnb/pull/49) and [#60](https://github.com/heroku/procfile-cnb/pull/60)).
- Updated `libcnb` and `libherokubuildpack` from 0.7.0 to 0.8.0 ([#82](https://github.com/heroku/procfile-cnb/pull/82)).

## 1.0.1

Expand Down
122 changes: 35 additions & 87 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ rust-version = "1.61"

[dependencies]
indoc = "1.0.6"
libcnb = "0.7.0"
libherokubuildpack = "0.7.0"
libcnb = "0.8.0"
libherokubuildpack = "0.8.0"
linked-hash-map = "0.5.4"
regex = "1.5.6"

[dev-dependencies]
libcnb-test = "0.3.1"
libcnb-test = "0.4.0"
4 changes: 1 addition & 3 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub enum ProcfileBuildpackError {
ProcfileConversionError(ProcfileConversionError),
}

pub fn error_handler(buildpack_error: ProcfileBuildpackError) -> i32 {
pub fn error_handler(buildpack_error: ProcfileBuildpackError) {
match buildpack_error {
ProcfileBuildpackError::CannotReadProcfileContents(io_error) => {
libherokubuildpack::log_error(
Expand Down Expand Up @@ -44,8 +44,6 @@ pub fn error_handler(buildpack_error: ProcfileBuildpackError) -> i32 {
}
},
}

1
}

impl From<ProcfileBuildpackError> for libcnb::Error<ProcfileBuildpackError> {
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ impl Buildpack for ProcfileBuildpack {
.build()
}

fn on_error(&self, error: libcnb::Error<Self::Error>) -> i32 {
libherokubuildpack::on_error_heroku(error_handler, error)
fn on_error(&self, error: libcnb::Error<Self::Error>) {
libherokubuildpack::on_error_heroku(error_handler, error);
}
}

Expand Down
Loading

0 comments on commit e2660d1

Please sign in to comment.