Gilnaa / memoffset

offsetof for Rust
MIT License
224 stars 29 forks source link

clippy unneeded_field_pattern warnings in consumer's code #34

Closed asomers closed 4 years ago

asomers commented 4 years ago

memoffset 0.5.1 and 0.5.3 cause clippy to warn in the consumer's crate. This should either be fixed or suppressed within memoffset.

warning: All the struct fields are matched to a wildcard pattern, consider using `..`.
  --> bfffs-fio/src/lib.rs:95:17
   |
95 |                 offset_of!(BfffsOptions, pool_name),
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(clippy::unneeded_field_pattern)]` on by default
   = help: Try with `BfffsOptions { .. }` instead
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern
   = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
RalfJung commented 4 years ago

Thanks for the report! https://github.com/Gilnaa/memoffset/pull/35 should fix this.