Use unwrap_or_default (#1928)

This commit is contained in:
Casey Rodarmor 2024-02-27 22:52:43 -08:00 committed by GitHub
parent da4ceb4c7b
commit b4d8e5b8c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,7 +17,8 @@ pub(crate) fn load_dotenv(
.as_ref()
.or(settings.dotenv_path.as_ref());
if !settings.dotenv_load.unwrap_or(false) && dotenv_filename.is_none() && dotenv_path.is_none() {
if !settings.dotenv_load.unwrap_or_default() && dotenv_filename.is_none() && dotenv_path.is_none()
{
return Ok(BTreeMap::new());
}