diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2023-08-21 12:52:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-21 12:52:34 -0400 |
commit | 817ffa8ec412baa4c33eba924840030a8beacbf0 (patch) | |
tree | a5cbd0d211b965fcfb85e698da39364c212f5422 /yjit | |
parent | ac819f4db9bb79ba92547e1abd36336f36633583 (diff) |
YJIT: Remove unnecessary roundtrip conversion
Diffstat (limited to 'yjit')
-rw-r--r-- | yjit/src/options.rs | 4 |
1 files 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 } |