summaryrefslogtreecommitdiff
path: root/cli/napi/env.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-01-27 10:43:16 -0500
committerGitHub <noreply@github.com>2023-01-27 10:43:16 -0500
commitf5840bdcd360ec0bac2501f333e58e25742b1537 (patch)
tree7eb0818d2cafa0f6824e81b6ed2cfb609830971e /cli/napi/env.rs
parent1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff)
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/napi/env.rs')
-rw-r--r--cli/napi/env.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/cli/napi/env.rs b/cli/napi/env.rs
index 922c64140..bdd5221e8 100644
--- a/cli/napi/env.rs
+++ b/cli/napi/env.rs
@@ -34,8 +34,7 @@ pub unsafe extern "C" fn napi_fatal_error(
std::str::from_utf8(slice).unwrap()
};
panic!(
- "Fatal exception triggered by napi_fatal_error!\nLocation: {:?}\n{}",
- location, message
+ "Fatal exception triggered by napi_fatal_error!\nLocation: {location:?}\n{message}"
);
}
@@ -46,10 +45,7 @@ fn napi_fatal_exception(env: *mut Env, value: napi_value) -> Result {
let env: &mut Env = env.as_mut().ok_or(Error::InvalidArg)?;
let value = transmute::<napi_value, v8::Local<v8::Value>>(value);
let error = value.to_rust_string_lossy(&mut env.scope());
- panic!(
- "Fatal exception triggered by napi_fatal_exception!\n{}",
- error
- );
+ panic!("Fatal exception triggered by napi_fatal_exception!\n{error}");
}
#[napi_sym::napi_sym]