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

Merged
merged 4 commits into from
Nov 29, 2024
Merged

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-29T15:21:13Z

#[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....

@rklaehn rklaehn force-pushed the refactor-switch-to-hex branch from baa3b7c to da1cf6d Compare November 29, 2024 15:13
# Conflicts:
#	Cargo.toml
#	examples/chat.rs
@rklaehn rklaehn force-pushed the refactor-switch-to-hex branch from 9dcff34 to 7bda326 Compare November 29, 2024 15:19
@rklaehn rklaehn merged commit f9c01bf into main Nov 29, 2024
23 of 24 checks passed
@rklaehn rklaehn deleted the refactor-switch-to-hex branch November 29, 2024 15:25
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