Skip to content

Commit

Permalink
Auto merge of #1132 - christianpoveda:use_scalar_to_u16, r=RalfJung
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Dec 28, 2019
2 parents 34d8ec8 + c60ab94 commit 16f5d20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8f5f8f916f00f7989a4ebf7b7dbfe1afd605f828
f564c4db0d97eabd7fdd72e589d3e415790ee2a4
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 16f5d20

Please sign in to comment.