Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump rand version to 0.8 and some other minor changes #688

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

rodoufu
Copy link

@rodoufu rodoufu commented Apr 25, 2024

No description provided.

@rodoufu rodoufu changed the title Bump rand version to 0.8 Bump rand version to 0.8 and some other minor changes Apr 25, 2024
edition = "2018"
keywords = ["jsonrpc", "json-rpc", "json", "rpc", "serde"]

[workspace.dependencies]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding workspace dependencies and also keeping mentions to crates in the workspace in the workspace dependencies.

Some(channel) => channel,
None => break,
};

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaner loop.

@@ -274,9 +269,9 @@ impl<T: Metadata, S: Middleware<T>> MetaIoHandler<T, S> {

let result = match (valid_version, self.methods.get(&method.method)) {
(false, _) => Err(Error::invalid_version()),
(true, Some(&RemoteProcedure::Method(ref method))) => Ok(call_method(method)),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary references.

parking_lot = "0.11.0"
rand = "0.7"
serde = "1.0"
rand = "0.8"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Increased rand version from 0.7 to 0.8


/// WebSockets Server Error
#[derive(Debug)]
pub enum Error {
/// Io Error
Io(io::Error),
/// WebSockets Error
WsError(ws::Error),
WsError(Box<ws::Error>),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variant of the enumeration is way larger than the other ones.

@rodoufu
Copy link
Author

rodoufu commented Apr 26, 2024

@sergejparity @mutantcornholio @alvicsam @niklasad1 @TarikGul @dvdplm @paritytech/ci @tomusdrw could someone please take a look whenever you can, and let me know what do you think?

@@ -27,7 +26,7 @@ arbitrary_precision = ["jsonrpc-client-transports/arbitrary_precision"]

[dependencies]
jsonrpc-client-transports = { version = "18.0.0", path = "./transports", default-features = false }
futures = { version = "0.3", features = [ "compat" ] }
futures = { version = "0.3", features = ["compat"] }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-futures = { version = "0.3", features = ["compat"] }
+futures = { workspace = true, features = ["compat"] }

?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right, I'm fixing it.

test/Cargo.toml Outdated
"jsonrpc-core-client/arbitrary_precision",
"serde_json/arbitrary_precision",
"jsonrpc-core/arbitrary_precision",
]

[dev-dependencies]
jsonrpc-derive = { version = "18.0.0", path = "../derive" }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use workspace dep?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsonrpc-derive was not in the workspace deps, but I can add it.

test/Cargo.toml Outdated
Comment on lines 13 to 15
jsonrpc-core = { version = "18.0.0", path = "../core" }
jsonrpc-core-client = { version = "18.0.0", path = "../core-client" }
jsonrpc-pubsub = { version = "18.0.0", path = "../pubsub" }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use workspace dep?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

stdio/Cargo.toml Outdated

[dependencies]
futures = "0.3"
futures.workspace = true
jsonrpc-core = { version = "18.0.0", path = "../core" }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use workspace dep?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


[dependencies]
bytes = "1.0"
futures = "0.3"
futures.workspace = true
globset = "0.4"
jsonrpc-core = { version = "18.0.0", path = "../core" }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use workspace dep?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@rodoufu
Copy link
Author

rodoufu commented Aug 21, 2024

@jayvdb I have added the changes you asked for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants