pyrossh / rust-embed

Rust Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
MIT License
1.67k stars 85 forks source link

Missing documentation for macro generated code #145

Closed orhun closed 3 years ago

orhun commented 3 years ago

Hey!

Most of my crates have the following instruction in lib.rs:

#![warn(missing_docs)]

And due to this I'm getting a warning when I'm using rust-embed:

warning: missing documentation for an associated function
  --> git-cliff-core/src/embed.rs:14:17
   |
14 | #[derive(Debug, RustEmbed)]
   |                 ^^^^^^^^^
   |
note: the lint level is defined here
  --> git-cliff-core/src/lib.rs:2:9
   |
2  | #![warn(missing_docs, clippy::unwrap_used)]
   |         ^^^^^^^^^^^^
   = note: this warning originates in the derive macro `RustEmbed` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: missing documentation for an associated function
  --> git-cliff-core/src/embed.rs:14:17
   |
14 | #[derive(Debug, RustEmbed)]
   |                 ^^^^^^^^^
   |
   = note: this warning originates in the derive macro `RustEmbed` (in Nightly builds, run with -Z macro-backtrace for more info)

So can we add (at least 1 line of) doc comments to macro generated functions? (get and iter) I think this would be good to have in case other people might face the same issue in the future.

What do you think? I'd like to provide a PR about this.

pyrossh commented 3 years ago

Sounds good to me. Sure you can raise a PR for it.