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

docs: pass Doc instead of Iroh in example #2432

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

azzamsa
Copy link
Contributor

@azzamsa azzamsa commented Jun 29, 2024

Description

Since iroh/examples/client.rs is the first example users see, it's likely they will use this file as a starting point for their app skeleton. I find it easier to keep Doc in a struct and pass it around rather than using iroh::client::Iroh.

I've also added a comment about the content_bytes() method, noting its ability to accept either a Doc or client::Iroh.

Related:

Breaking Changes

No.

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@Frando Frando changed the title refactor(iroh): pass Doc instead of Iroh refactor(iroh): pass Doc instead of Iroh in example Jul 1, 2024
Copy link
Member

@Frando Frando left a comment

Choose a reason for hiding this comment

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

LGTM!

iroh/examples/client.rs Outdated Show resolved Hide resolved
@dignifiedquire dignifiedquire changed the title refactor(iroh): pass Doc instead of Iroh in example docs: pass Doc instead of Iroh in example Jul 2, 2024
@dignifiedquire dignifiedquire added this pull request to the merge queue Jul 2, 2024
Merged via the queue into n0-computer:main with commit 975124c Jul 2, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants