Skip to content

Commit

Permalink
Convert return type with try_into
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrk committed Oct 17, 2020
1 parent a68072d commit 0ad447f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/kernel/src/file_operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ unsafe extern "C" fn fsync_callback<T: FileOperations>(
let fsync = T::FSYNC.unwrap();
let f = &*((*file).private_data as *const T);
match fsync(f, &File::from_ptr(file), start, end, datasync) {
Ok(result) => result as c_types::c_int,
Ok(result) => result.try_into().unwrap(),
Err(e) => e.to_kernel_errno(),
}
}
Expand Down

0 comments on commit 0ad447f

Please sign in to comment.