Open
Description
I'm currently preparing a PR, and while following the contribution guide, I ran into issues with rustfmt during the pre-commit hook.
It seems like several files in the current codebase don’t actually pass the check cleanly. As a result, any PR I submit would either:
- include unrelated rustfmt changes alongside my intended changes, or
- fail the pre-commit check
For example, in vmm/src/builder.rs
, here are a couple of diffs produced by rustfmt on my environment:
- use crate::vmm_config::balloon::{BALLOON_DEV_ID, BalloonBuilder, BalloonDeviceConfig};
+ use crate::vmm_config::balloon::{BalloonBuilder, BalloonDeviceConfig, BALLOON_DEV_ID};
[...]
- assert!(
- vmm.mmio_device_manager
- .get_device(DeviceType::Virtio(TYPE_BLOCK), drive_id.as_str())
- .is_some()
- );
+ assert!(vmm
+ .mmio_device_manager
+ .get_device(DeviceType::Virtio(TYPE_BLOCK), drive_id.as_str())
+ .is_some());
}
My environment is:
$ rustc --version
rustc 1.85.0 (4d91de4e4 2025-02-17)
$ rustfmt --version
rustfmt 1.8.0-stable (4d91de4e48 2025-02-17)
Could you clarify the expected approach in this situation?
Thanks.