-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Refactor to use new ResourceId from reactor crate #36
Conversation
Cargo.toml
Outdated
@@ -38,3 +38,6 @@ log = ["log_crate", "io-reactor/log"] | |||
[package.metadata.docs.rs] | |||
all-features = true | |||
rustc-args = ["--cfg", "docsrs"] | |||
|
|||
[patch.crates-io] | |||
io-reactor = { git = "https://github.com/rust-amplify/io-reactor", branch = "resourceid" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to remove this once io-reactor patch is merged
src/resource.rs
Outdated
} | ||
self.id = Some(id); | ||
Ok(()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the logging above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean inside the new display
method, which is called by each logging line in the file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean set_resource_id
Depends on rust-amplify/io-reactor#23
The only issue was the fact that we used resource id in the debug logging. Thus, I added a way to add it to the net session after it is registered with the reactor (it will be returned from the registration method). Before that it defaults to printing information about the underlying net session.