Skip to content

Commit 411b42b

Browse files
committed
use From instead of casts
1 parent cfa2083 commit 411b42b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/structures/gdt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ impl Descriptor {
497497
low.set_bits(16..40, ptr.get_bits(0..24));
498498
low.set_bits(56..64, ptr.get_bits(24..32));
499499
// limit (the `-1` is needed since the bound is inclusive)
500-
let iomap_limit = unsafe { (*tss).iomap_base } as u64 + iomap_size as u64;
500+
let iomap_limit = u64::from(unsafe { (*tss).iomap_base }) + u64::from(iomap_size);
501501
low.set_bits(
502502
0..16,
503503
cmp::max(mem::size_of::<TaskStateSegment>() as u64, iomap_limit) - 1,

0 commit comments

Comments
 (0)