rust-vmm / vm-virtio

virtio implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[virtio-queue] document conversion safety

lauralt opened this issue · comments

We are converting from an usize to an u16 here. We should document why the conversion is safe, i.e. "we just validated above that table_len <= usize::from(std::u16::MAX)". We should also double-check if there are other possible unsafe conversions.