Skip to content

Commit 8347b28

Browse files
committed
identical conversion
1 parent 7cd67ad commit 8347b28

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/registers/model_specific.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ mod x86_64 {
323323
return Err("Syscall's segment must be a Ring0 segment.");
324324
}
325325

326-
unsafe { Self::write_raw((ss_sysret.0 - 8).into(), cs_syscall.0.into()) };
326+
unsafe { Self::write_raw(ss_sysret.0 - 8, cs_syscall.0) };
327327

328328
Ok(())
329329
}

src/structures/paging/frame.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<S: PageSize> fmt::Debug for PhysFrame<S> {
7474
impl<S: PageSize> Add<u64> for PhysFrame<S> {
7575
type Output = Self;
7676
fn add(self, rhs: u64) -> Self::Output {
77-
PhysFrame::containing_address(self.start_address() + rhs * u64::from(S::SIZE))
77+
PhysFrame::containing_address(self.start_address() + rhs * S::SIZE)
7878
}
7979
}
8080

@@ -87,7 +87,7 @@ impl<S: PageSize> AddAssign<u64> for PhysFrame<S> {
8787
impl<S: PageSize> Sub<u64> for PhysFrame<S> {
8888
type Output = Self;
8989
fn sub(self, rhs: u64) -> Self::Output {
90-
PhysFrame::containing_address(self.start_address() - rhs * u64::from(S::SIZE))
90+
PhysFrame::containing_address(self.start_address() - rhs * S::SIZE)
9191
}
9292
}
9393

src/structures/paging/page.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl<S: PageSize> fmt::Debug for Page<S> {
206206
impl<S: PageSize> Add<u64> for Page<S> {
207207
type Output = Self;
208208
fn add(self, rhs: u64) -> Self::Output {
209-
Page::containing_address(self.start_address() + rhs * u64::from(S::SIZE))
209+
Page::containing_address(self.start_address() + rhs * S::SIZE)
210210
}
211211
}
212212

@@ -219,7 +219,7 @@ impl<S: PageSize> AddAssign<u64> for Page<S> {
219219
impl<S: PageSize> Sub<u64> for Page<S> {
220220
type Output = Self;
221221
fn sub(self, rhs: u64) -> Self::Output {
222-
Page::containing_address(self.start_address() - rhs * u64::from(S::SIZE))
222+
Page::containing_address(self.start_address() - rhs * S::SIZE)
223223
}
224224
}
225225

0 commit comments

Comments
 (0)