libcnb.rs
libcnb.rs copied to clipboard
`log_error()`, `log_warning()`, `log_info()` and `log_header()` should use `.expect()` instead of `.unwrap()`
Currently there are lots of usages of unwrap()
in production code, in the logging helpers in:
https://github.com/heroku/libcnb.rs/blob/2698a713edf19034e382aa702e12acc1516da8fa/libherokubuildpack/src/log.rs
Whilst the nature of these failure modes means that we can't use a Result (and so panicing is appropriate) - we should use .expect()
instead of an .unwrap()
so at least the panic message is more descriptive.
Note: The log
module will be removed in the future, since it's been superseded by the build_output
module.