diff --git a/Cargo.lock b/Cargo.lock index f82b31bbed..ab75a1f1d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -51,7 +51,7 @@ dependencies = [ "encoding_rs", "flate2", "futures-core", - "h2 0.3.25", + "h2 0.3.26", "http 0.2.12", "httparse", "httpdate", @@ -1135,11 +1135,11 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "deadpool" -version = "0.11.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c380a837cb8cb747898b1be7fa5ba5b871eb1210f8881d6512946c132617f80" +checksum = "fb84100978c1c7b37f09ed3ce3e5f843af02c2a2c431bae5b19230dad2c1b490" dependencies = [ - "console", + "async-trait", "deadpool-runtime", "num_cpus", "tokio", @@ -1147,9 +1147,9 @@ dependencies = [ [[package]] name = "deadpool-postgres" -version = "0.13.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aa08f5c838496cbabb672e3614534444145fc6632995f102e13d30a29a25a13" +checksum = "bda39fa1cfff190d8924d447ad04fd22772c250438ca5ce1dfb3c80621c05aaa" dependencies = [ "deadpool", "tokio", @@ -2205,9 +2205,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -2224,9 +2224,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" +checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" dependencies = [ "bytes", "fnv", @@ -2394,7 +2394,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.25", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -2417,7 +2417,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.3", + "h2 0.4.4", "http 1.1.0", "http-body 1.0.0", "httparse", @@ -3716,7 +3716,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.25", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.28", @@ -3757,7 +3757,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.4.3", + "h2 0.4.4", "http 1.1.0", "http-body 1.0.0", "http-body-util", diff --git a/Cargo.toml b/Cargo.toml index 11d261b9e4..4fdfa2e78e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,8 +66,8 @@ actix-http = "3" antidote = "1" dirs = "5" native-tls = "0.2" -deadpool-postgres = "0.13" -deadpool = "0.11" +deadpool-postgres = "0.12" +deadpool = "0.10" postgres-native-tls = "0.5" tokio-postgres = { version = "0.7", features = ["with-serde_json-1", "with-uuid-1"] } postgres-types = "0.2" diff --git a/fastn-ds/src/wasm/helpers.rs b/fastn-ds/src/wasm/helpers.rs index 4a071876b5..16e33947d6 100644 --- a/fastn-ds/src/wasm/helpers.rs +++ b/fastn-ds/src/wasm/helpers.rs @@ -71,10 +71,15 @@ async fn _dealloc( .into_func() .expect("dealloc is not a func"); - dealloc + let res = dealloc .call_async(caller, &[wasmtime::Val::I32(ptr)], &mut result) - .await - .inspect_err(|e| println!("got error when calling func: {e:?}")) + .await; + + if let Err(ref e) = res { + println!("got error when calling dealloc: {e:?}"); + } + + res } async fn _dealloc_with_len( @@ -89,14 +94,19 @@ async fn _dealloc_with_len( .into_func() .expect("dealloc_with_len is not a func"); - dealloc_with_len + let res = dealloc_with_len .call_async( caller, &[wasmtime::Val::I32(ptr), wasmtime::Val::I32(len)], &mut result, ) - .await - .inspect_err(|e| println!("got error when calling func: {e:?}")) + .await; + + if let Err(ref e) = res { + println!("got error when calling func: {e:?}"); + } + + res } async fn alloc( @@ -110,10 +120,13 @@ async fn alloc( .into_func() .expect("alloc is not a func"); - alloc + let res = alloc .call_async(caller, &[wasmtime::Val::I32(size)], &mut result) - .await - .inspect_err(|e| println!("got error when calling func: {e:?}"))?; + .await; + + if let Err(ref e) = res { + println!("got error when calling func: {e:?}"); + } Ok(result[0].i32().expect("result is not i32")) }