Skip to content

Commit 962e210

Browse files
committed
remove an unnecessary as_str
1 parent 47b91e6 commit 962e210

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/machine.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ impl MemoryExtra {
106106
pub fn init_extern_statics<'tcx, 'mir>(
107107
this: &mut MiriEvalContext<'mir, 'tcx>,
108108
) -> InterpResult<'tcx> {
109-
let target_os = this.tcx.sess.target.target.target_os.as_str();
110-
match target_os {
109+
match this.tcx.sess.target.target.target_os.as_str() {
111110
"linux" => {
112111
// "__cxa_thread_atexit_impl"
113112
// This should be all-zero, pointer-sized.

src/shims/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
802802

803803
this.check_no_isolation("mkdir")?;
804804

805-
let _mode = if this.tcx.sess.target.target.target_os.as_str() == "macos" {
805+
let _mode = if this.tcx.sess.target.target.target_os == "macos" {
806806
u32::from(this.read_scalar(mode_op)?.not_undef()?.to_u16()?)
807807
} else {
808808
this.read_scalar(mode_op)?.to_u32()?

0 commit comments

Comments
 (0)