default-env
default_env!
is a macro like env!
that returns a default value if the environment variable is not found.
Unlike option_env!
, the output of default_env!
can be used in macros (because who doesn't love macros in their macros?).
Example