chore: stop cargo fmt from rewriting the generated bindings

The #[path] imports make rustfmt treat the vendor's generated bindings as
crate source, so `cargo fmt` rewrapped ~1400 lines of api.rs/ffi.rs inside
the submodule. The next regen reverts that, so it is pure churn -- and it
shows up as a spurious dirty vendor.

rustfmt.toml `ignore` would be the natural fix, but it is nightly-only and
is silently dropped on stable ("unstable features are only available in
nightly channel"), so the skip attribute goes on the imports instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ivan FB 2026-07-16 18:45:56 +02:00
parent fec1784ad5
commit f5153ac5a9
No known key found for this signature in database
GPG Key ID: DF0C67A04C543270

View File

@ -74,13 +74,21 @@ pub mod node;
// regenerating it flows through directly. `api` resolves its siblings through
// `super::`, so the three stay crate-root sibling modules. build.rs compiles
// and links the underlying Nim library.
//
// `rustfmt::skip` because `#[path]` makes rustfmt treat these as crate source
// and rewrite them in the submodule; the next regen would revert it anyway, so
// `cargo fmt` would just churn the vendor. (rustfmt.toml `ignore` would be the
// natural fix, but it is nightly-only.)
#[allow(clippy::all)]
#[rustfmt::skip]
#[path = "../../vendor/library/rust_bindings/src/ffi.rs"]
mod ffi;
#[allow(clippy::all)]
#[rustfmt::skip]
#[path = "../../vendor/library/rust_bindings/src/types.rs"]
mod types;
#[allow(clippy::all)]
#[rustfmt::skip]
#[path = "../../vendor/library/rust_bindings/src/api.rs"]
mod api;
@ -101,6 +109,4 @@ use rln;
pub use general::contenttopic::{Encoding, WakuContentTopic};
pub use general::store::{StoreQueryRequest, StoreResponse, StoreWakuMessageResponse};
pub use general::{messagehash::MessageHash, Result, WakuMessage, WakuMessageVersion};
pub use node::{
Key, Multiaddr, PublicKey, PubsubTopic, RLNConfig, SecretKey, WakuNodeConfig,
};
pub use node::{Key, Multiaddr, PublicKey, PubsubTopic, RLNConfig, SecretKey, WakuNodeConfig};