Skip to content

Commit 0f0b9af

Browse files
updated qjs
1 parent 46de2bb commit 0f0b9af

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "green_copper_runtime"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
authors = ["[email protected]"]
55
edition = "2018"
66
license = "MIT"
@@ -48,12 +48,12 @@ cache = ["lru"]
4848

4949

5050
[dependencies]
51-
quickjs_runtime = { version = "0.14" }
51+
quickjs_runtime = { version = "0.15" }
5252
#quickjs_runtime = { path = '../quickjs_es_runtime', features = ["typescript", "default"]}
5353
#quickjs_runtime = { git = 'https://github.com/HiRoFa/quickjs_es_runtime', features = ["typescript", "default"]}
5454
#libquickjs-sys = {package="hirofa-quickjs-sys", path='../quickjs-sys', features=["quickjs-ng"]}
5555
#libquickjs-sys = {package="hirofa-quickjs-sys", git='https://github.com/HiRoFa/quickjs-sys', features=["bellard"]}
56-
libquickjs-sys = { package = "hirofa-quickjs-sys", version = "0.9", features = ["bellard"], default-features = false }
56+
libquickjs-sys = { package = "hirofa-quickjs-sys", version = "0.10", features = ["bellard"], default-features = false }
5757
hirofa_utils = "0.7"
5858
#hirofa_utils = {git = "https://github.com/HiRoFa/utils"}
5959
#hirofa_utils = { path = '../utils'}

src/modules/db/sqlx/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ pub mod tests {
17161716
use quickjs_runtime::values::JsValueFacade;
17171717
use std::panic;
17181718

1719-
#[tokio::test]
1719+
//#[tokio::test]
17201720
async fn _test_sqlx() {
17211721
/*
17221722
panic::set_hook(Box::new(|panic_info| {

src/modules/htmldom/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ fn register_node(
288288
// reuse here to create a new JsValueAdapter (and then increment refcount)
289289

290290
NODE_VALUE_BY_NODEREF.with(|rc| {
291+
#[allow(clippy::mutable_key_type)]
291292
let node_ref_map = &mut *rc.borrow_mut();
292293
if let Some(value) = node_ref_map.get(&node) {
293294
Ok(value.clone())
@@ -434,6 +435,7 @@ fn init_node_proxy(realm: &QuickJsRealmAdapter) -> Result<QuickJsValueAdapter, J
434435
map.remove(&id)
435436
});
436437
NODE_VALUE_BY_NODEREF.with(|rc| {
438+
#[allow(clippy::mutable_key_type)]
437439
let map = &mut *rc.borrow_mut();
438440
map.remove(&node);
439441
});
@@ -656,7 +658,6 @@ fn init_node_proxy(realm: &QuickJsRealmAdapter) -> Result<QuickJsValueAdapter, J
656658
while let Some(child) = node.first_child() {
657659
// todo do i need to do this recursively?
658660
child.detach();
659-
child.parent().take();
660661
}
661662

662663
// todo actually use fragment and don't get a full html doc? or is there another faster way..?
@@ -1629,7 +1630,6 @@ pub mod tests {
16291630
}));
16301631

16311632
simple_logging::log_to_file("grecort.log", log::LevelFilter::max())
1632-
.ok()
16331633
.expect("could not init logger");
16341634

16351635
let rtb = QuickJsRuntimeBuilder::new();

src/modules/jwt/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ use quickjs_runtime::quickjsvalueadapter::QuickJsValueAdapter;
3232
use quickjs_runtime::values::JsValueFacade::TypedArray;
3333
use quickjs_runtime::values::{JsValueFacade, TypedArrayType};
3434
use serde_json::Value;
35+
use std::fmt::Display;
3536
use std::str::FromStr;
3637

3738
struct JwtModuleLoader {}
@@ -95,12 +96,13 @@ impl FromStr for JwtAlgo {
9596
}
9697
}
9798

98-
impl ToString for JwtAlgo {
99-
fn to_string(&self) -> String {
100-
match self {
99+
impl Display for JwtAlgo {
100+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
101+
let str = match self {
101102
EdDSA => "EdDSA".to_string(),
102103
RS512 => "Rs512".to_string(),
103-
}
104+
};
105+
write!(f, "{}", str)
104106
}
105107
}
106108

0 commit comments

Comments
 (0)