From 787a424a86e1f2143346080bc7dc9b3714166b8b Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Fri, 7 Oct 2022 10:49:29 +0200 Subject: [PATCH] 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 --- src/vhost_user/connection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vhost_user/connection.rs b/src/vhost_user/connection.rs index 2d39965..a96af77 100644 --- a/src/vhost_user/connection.rs +++ b/src/vhost_user/connection.rs @@ -356,7 +356,7 @@ impl Endpoint { .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)