Skip to content

Commit 0ad447f

Browse files
committed
Convert return type with try_into
1 parent a68072d commit 0ad447f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/kernel/src/file_operations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ unsafe extern "C" fn fsync_callback<T: FileOperations>(
158158
let fsync = T::FSYNC.unwrap();
159159
let f = &*((*file).private_data as *const T);
160160
match fsync(f, &File::from_ptr(file), start, end, datasync) {
161-
Ok(result) => result as c_types::c_int,
161+
Ok(result) => result.try_into().unwrap(),
162162
Err(e) => e.to_kernel_errno(),
163163
}
164164
}

0 commit comments

Comments
 (0)