Open edmorley opened 10 months ago
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
unwrap()
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.
.expect()
.unwrap()
Note: The log module will be removed in the future, since it's been superseded by the build_output module.
log
build_output
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.rsWhilst 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.