vhost_user: Fix warning about unsafe not needed

There's no need to specify unsafe given the whole function is already
considered unsafe.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2022-10-07 10:49:29 +02:00
parent 796b9d9dfc
commit 787a424a86

View file

@ -356,7 +356,7 @@ impl<R: Req> Endpoint<R> {
.take(n)
.map(|fd| {
// Safe because we have the ownership of `fd`.
unsafe { File::from_raw_fd(*fd) }
File::from_raw_fd(*fd)
})
.collect();
Some(files)