hermit-os / hermit-os/kernel

PCI: Investigate `clippy::large_enum_variant`

Open
#555 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.5k
Forks
132
Avg merge
1d 14h
Merged PRs (30d)
39

Description

```
warning: large size difference between variants
--> src/arch/x86_64/kernel/pci.rs:120:1
|
120 | / pub enum PciDriver<'a> {
121 | | VirtioFs(SpinlockIrqSave>),
| | --------------------------------------------- the largest variant contains at least 384 bytes
122 | | VirtioNet(SpinlockIrqSave),
| | ------------------------------------------- the second-largest variant contains at least 0 bytes
123 | | RTL8139Net(SpinlockIrqSave),
124 | | }
| |_^ the entire enum is at least 0 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
= note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
|
121 | VirtioFs(Box>>),
|
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.