Skip to content

Commit

Permalink
update tokio and jsonrpsee
Browse files Browse the repository at this point in the history
  • Loading branch information
andogq committed May 24, 2024
1 parent fccae57 commit 3530e28
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
23 changes: 12 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
workspace = { members = [ "./crates/*", "./examples/*" ] }
workspace = { members = ["./crates/*", "./examples/*"] }

[package]
name = "qubit"
version = "0.0.10"
edition = "2021"
authors = [ "Tom Anderson <[email protected]>" ]
authors = ["Tom Anderson <[email protected]>"]
repository = "https://github.com/andogq/qubit"
license = "MIT"
description = "Type-safe framework for an JSONRPC server written in Rust with an automatically generated TypeScript client."
exclude = [ "./client", "./example" ]
exclude = ["./client", "./example"]

[dependencies]
axum = "0.6.20"
futures = "0.3.30"
http = "0.2.9"
hyper = { version = "0.14.10", features = [ "server" ] }
jsonrpsee = { version = "0.21.0", features = [ "server" ] }
serde = { version = "1.0.195", features = [ "derive" ] }
hyper = { version = "0.14.28", features = ["server"] }
jsonrpsee = { version = "0.22.5", features = ["server"] }
serde = { version = "1.0.195", features = ["derive"] }
serde_json = "1.0.111"
tokio = { version = "1.35.1", features = [ "rt", "rt-multi-thread" ] }
tokio = { version = "1.37.0", features = ["rt", "rt-multi-thread"] }
tower = "0.4.13"
ts-rs = "8.1.0"
qubit-macros = { version = "0.0.7", path = "./crates/qubit-macros" }
4 changes: 2 additions & 2 deletions src/builder/rpc_builder.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::ops::Deref;

use futures::{Future, FutureExt, Stream, StreamExt};
use futures::{Future, Stream, StreamExt};
use jsonrpsee::{
types::{Params, ResponsePayload},
RpcModule, SubscriptionCloseResponse, SubscriptionMessage,
Expand Down Expand Up @@ -70,7 +70,7 @@ where
};

// Run the actual handler
ResponsePayload::result(handler(ctx, params).await)
ResponsePayload::success(handler(ctx, params).await)
}
})
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/server/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl From<&RpcError> for ErrorObjectOwned {
impl IntoResponse for RpcError {
type Output = <ErrorObjectOwned as IntoResponse>::Output;

fn into_response(self) -> jsonrpsee::types::ResponsePayload<'static, Self::Output> {
fn into_response(self) -> jsonrpsee::ResponsePayload<'static, Self::Output> {
ErrorObjectOwned::from(self).into_response()
}
}
Expand Down

0 comments on commit 3530e28

Please sign in to comment.