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

GEN-108: Add a simple example for new error-stack users starting new project #3228

Merged
merged 1 commit into from
Sep 23, 2023

Conversation

dpc
Copy link
Contributor

@dpc dpc commented Sep 22, 2023

Fix #3209

🌟 What is the purpose of this PR?

As a ever-re-returning user that wants to start a new project
using error-stack, I open http://docs.rs/error-stack and get
lots of words explaining some details, and not a single basic
example that would get me going.

This PR adds the simple example code that I'm looking always
looking for.

🛡 What tests cover this?

cargo test --doc :)

@CLAassistant
Copy link

CLAassistant commented Sep 22, 2023

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #3228 (5b07a07) into main (069f9c9) will increase coverage by 1.06%.
Report is 6 commits behind head on main.
The diff coverage is n/a.

@@           Coverage Diff            @@
##            main   #3228      +/-   ##
========================================
+ Coverage   1.23%   2.30%   +1.06%     
========================================
  Files        112     120       +8     
  Lines       3792    4038     +246     
  Branches     456     495      +39     
========================================
+ Hits          47      93      +46     
- Misses      3743    3939     +196     
- Partials       2       6       +4     
Flag Coverage Δ
unit-tests 1.34% <ø> (+1.34%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 8 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@TimDiekmann TimDiekmann changed the title Add a simple example for new error-stack users starting new project GEN-108: Add a simple example for new error-stack users starting new project Sep 22, 2023
@TimDiekmann TimDiekmann requested a review from a team September 22, 2023 09:50
Copy link
Member

@TimDiekmann TimDiekmann left a comment

Choose a reason for hiding this comment

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

Thank you very much for your contribution. I think I'm sold on using thiserror in this context, otherwise, 4 additional impl blocks would have been required.
Happy to approve as soon as linting is passing (rustfmt is currently failing).

@dpc
Copy link
Contributor Author

dpc commented Sep 22, 2023

Thank you. Fixed (passes locally).

Copy link
Member

@TimDiekmann TimDiekmann left a comment

Choose a reason for hiding this comment

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

Amazing, thank you!

We can merge the PR as soon as the CLA is signed.

Btw, there is no need to force-push to rewrite the history of a PR, we squash merge anyway to keep a clean history in main.

@dpc
Copy link
Contributor Author

dpc commented Sep 23, 2023

We can merge the PR as soon as the CLA is signed.

Oh. I missed that. Done.

@TimDiekmann TimDiekmann added this pull request to the merge queue Sep 23, 2023
Merged via the queue into hashintel:main with commit 456a5f5 Sep 23, 2023
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/libs > error-stack Affects the `error-stack` crate (library) area/libs Relates to first-party libraries/crates/packages (area)
Development

Successfully merging this pull request may close these issues.

GEN-108(issue): Show some minimal but working example on the main documentation page
3 participants