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!: use hex for debugging and display #2

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dignifiedquire
Copy link
Contributor

@dignifiedquire dignifiedquire commented Oct 25, 2024

Everything except the ticket in the examples is now using hex

Breaking Changes

  • Ids are now encoded and parsed as hex instead of base32

Ref n0-computer/iroh#2841

Everything except the ticket in the examples is now using hex

Ref n0-computer/iroh#2841
@dignifiedquire dignifiedquire changed the title refactor: use hex for debugging and display refactor!: use hex for debugging and display Oct 25, 2024
Copy link

github-actions bot commented Oct 25, 2024

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh-gossip/pr/2/docs/iroh_gossip/

Last updated: 2024-11-15T14:51:07Z

#[derive(Eq, PartialEq)]
struct Id([u8; 32]);
idbytes_impls!(Id, "Id");
let id: Id = [1u8; 32].into();
assert_eq!(id, Id::from_str(&format!("{id}")).unwrap());
assert_eq!(
&format!("{id}"),
"aeaqcaibaeaqcaibaeaqcaibaeaqcaibaeaqcaibaeaqcaibaeaq"
"0101010101010101010101010101010101010101010101010101010101010101"
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it beautiful....

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