mirror of
https://github.com/tauri-apps/javascriptcore-rs.git
synced 2026-01-31 00:35:17 +01:00
Simplify implementation of Value::to_boolean.
This commit is contained in:
@@ -62,8 +62,7 @@ impl Value {
|
||||
}
|
||||
|
||||
pub fn to_boolean(&self, context: &GlobalContext) -> bool {
|
||||
let value = unsafe { JSValueToBoolean(context.raw, self.raw) };
|
||||
value != 0
|
||||
unsafe { JSValueToBoolean(context.raw, self.raw) != 0}
|
||||
}
|
||||
|
||||
pub fn to_string(&self, context: &GlobalContext) -> Option<String> {
|
||||
|
||||
Reference in New Issue
Block a user