-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add default value macro #61
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #61 +/- ##
==========================================
- Coverage 86.77% 81.71% -5.07%
==========================================
Files 7 7
Lines 242 257 +15
==========================================
Hits 210 210
- Misses 32 47 +15
Continue to review full report at Codecov.
|
@@ -0,0 +1,16 @@ | |||
error: proc-macro derive panicked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this file added intentionally? I can't see a place that it is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These stderr files are generated for the tests that use trybuild
. It compares this to the stderr from compiling the associated rs file: https://github.com/dtolnay/trybuild#workflow
edit: This style of test is also used in the Rust project itself!
https://github.com/rust-lang/rust/tree/master/src/test/ui
This PR adds an alternative macro,
dotenv_or_default
, which will provide a default value if the environment variable does not exist.Example: