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

Refactor to use new ResourceId from reactor crate #36

Merged
merged 4 commits into from
Jan 10, 2024
Merged

Conversation

dr-orlovsky
Copy link
Member

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.

@dr-orlovsky dr-orlovsky added enhancement New feature or request breaking labels Dec 19, 2023
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" }
Copy link
Contributor

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(())
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this used?

Copy link
Member Author

Choose a reason for hiding this comment

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

In the logging above

Copy link
Member Author

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

Copy link
Contributor

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

@dr-orlovsky dr-orlovsky merged commit 7935ff0 into master Jan 10, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants