Skip to content

Conversation

@ivinjabraham
Copy link
Member

Environment variables like "ROOT_SECRET" and "ROOT_PORT" can have sensible defaults and does not need to nag the user to set them in order to start. Provide default values in case they are not found in env.

Additionally, the default provided for ROOT_ENV is passed in through unwrap_or_else, but this extra lazy evaluation isn't optimizing much and only hinders readability. Change this to unwrap_or as simple strings are not compute heavy enough to warrant the lazy eval.

Environment variables like "ROOT_SECRET" and "ROOT_PORT" can have
sensible defaults and does not need to nag the user to set them in order
to start. Provide default values in case they are not found in env.

Additionally, the default provided for ROOT_ENV is passed in through
`unwrap_or_else`, but this extra lazy evaluation isn't optimizing much
and only hinders readability. Change this to `unwrap_or` as simple
strings are not compute heavy enough to warrant the lazy eval.

Signed-off-by: Ivin Joel Abraham <[email protected]>
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