Skip to content

Commit 965211e

Browse files
committed
remove helper fn 'read_os_str_from_target_str()'
1 parent bdcb762 commit 965211e

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/helpers.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -463,18 +463,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
463463
}
464464
}
465465

466-
/// Dispatches to appropriate implementations for reading an OsString from Memory,
467-
/// depending on the interpretation target.
468-
/// FIXME: Use `Cow` to avoid copies
469-
fn read_os_str_from_target_str(&self, scalar: Scalar<Tag>) -> InterpResult<'tcx, OsString> {
470-
let target_os = self.eval_context_ref().tcx.sess.target.target.target_os.as_str();
471-
match target_os {
472-
"linux" | "macos" => self.read_os_str_from_c_str(scalar).map(|x| x.to_os_string()),
473-
"windows" => self.read_os_str_from_wide_str(scalar),
474-
unsupported => throw_unsup_format!("OsString support for target OS `{}` not yet available", unsupported),
475-
}
476-
}
477-
478466
/// Helper function to read an OsString from a null-terminated sequence of bytes, which is what
479467
/// the Unix APIs usually handle.
480468
fn read_os_str_from_c_str<'a>(&'a self, scalar: Scalar<Tag>) -> InterpResult<'tcx, &'a OsStr>

0 commit comments

Comments
 (0)