Skip to content

Commit

Permalink
Use Scalar::to_u16
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Dec 28, 2019
1 parent 34d8ec8 commit b7e6135
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/shims/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
None => return Ok(-1),
};

// FIXME: use Scalar::to_u16
let mode: u16 = metadata.mode.to_bits(Size::from_bits(16))? as u16;
let mode: u16 = metadata.mode.to_u16()?;

let (access_sec, access_nsec) = metadata.accessed.unwrap_or((0, 0));
let (created_sec, created_nsec) = metadata.created.unwrap_or((0, 0));
Expand Down

0 comments on commit b7e6135

Please sign in to comment.