From 817ffa8ec412baa4c33eba924840030a8beacbf0 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Mon, 21 Aug 2023 12:52:34 -0400 Subject: [PATCH] YJIT: Remove unnecessary roundtrip conversion --- yjit/src/options.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yjit/src/options.rs b/yjit/src/options.rs index 4448ece8ec..cbed271819 100644 --- a/yjit/src/options.rs +++ b/yjit/src/options.rs @@ -164,7 +164,7 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> { } }, - ("dump-disasm", _) => match opt_val.to_string().as_str() { + ("dump-disasm", _) => match opt_val { "" => unsafe { OPTIONS.dump_disasm = Some(DumpDisasm::Stdout) }, directory => { let pid = std::process::id(); @@ -180,7 +180,7 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> { ("greedy-versioning", "") => unsafe { OPTIONS.greedy_versioning = true }, ("no-type-prop", "") => unsafe { OPTIONS.no_type_prop = true }, - ("stats", _) => match opt_val.to_string().as_str() { + ("stats", _) => match opt_val { "" => unsafe { OPTIONS.gen_stats = true }, "quiet" => { unsafe { OPTIONS.gen_stats = true }