-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
I ran Clippy's pedantic lints (which are disabled by default since they are typically subjective or have high false positive rates) against this repository out of curiosity, and am filing a few issues for some of the lints that warned that seemed relevant (in part to give some easy issues for people to work through to get involved with this library).
Feel free to close this out if not wanted :-)
See:
https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
https://rust-lang.github.io/api-guidelines/documentation.html#function-docs-include-error-panic-and-safety-considerations-c-failure
$ cargo clippy --all-targets --all-features -- -W clippy::missing-panics-doc
Checking libcnb v0.2.0 (/Users/emorley/src/libcnb.rs)
warning: docs for function which may panic missing `# Panics` section
--> src/layer_env.rs:242:5
|
242 | / pub fn read_from_layer_dir(layer_dir: impl AsRef<Path>) -> Result<LayerEnv, std::io::Error> {
243 | | let mut result_layer_env = LayerEnv::new();
244 | |
245 | | let bin_path = layer_dir.as_ref().join("bin");
... |
288 | | Ok(result_layer_env)
289 | | }
| |_____^
|
= note: requested on the command line with `-W clippy::missing-panics-doc`
note: first possible panic found here
--> src/layer_env.rs:265:26
|
265 | _ => panic!("Unexpected TargetLifecycle in read_from_layer_dir implementation. This is a libcnb implementation error!"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
= note: this warning originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
Metadata
Metadata
Assignees
Labels
No labels