Skip to content

Commit 424f184

Browse files
Rust formatting
1 parent e2efe84 commit 424f184

1 file changed

Lines changed: 18 additions & 20 deletions

File tree

rust/src/session.rs

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -769,16 +769,15 @@ impl Client {
769769
if self.inner.session_fs_configured && session_fs_provider.is_none() {
770770
return Err(Error::Session(SessionError::SessionFsProviderRequired));
771771
}
772-
if self.inner.session_fs_sqlite_declared {
773-
if let Some(ref provider) = session_fs_provider {
774-
if provider.sqlite().is_none() {
775-
return Err(Error::InvalidConfig(
776-
"SessionFs capabilities declare SQLite support but the provider \
777-
does not implement SessionFsSqliteProvider"
778-
.to_string(),
779-
));
780-
}
781-
}
772+
if self.inner.session_fs_sqlite_declared
773+
&& let Some(ref provider) = session_fs_provider
774+
&& provider.sqlite().is_none()
775+
{
776+
return Err(Error::InvalidConfig(
777+
"SessionFs capabilities declare SQLite support but the provider \
778+
does not implement SessionFsSqliteProvider"
779+
.to_string(),
780+
));
782781
}
783782

784783
if hooks.is_some() && config.hooks.is_none() {
@@ -901,16 +900,15 @@ impl Client {
901900
if self.inner.session_fs_configured && session_fs_provider.is_none() {
902901
return Err(Error::Session(SessionError::SessionFsProviderRequired));
903902
}
904-
if self.inner.session_fs_sqlite_declared {
905-
if let Some(ref provider) = session_fs_provider {
906-
if provider.sqlite().is_none() {
907-
return Err(Error::InvalidConfig(
908-
"SessionFs capabilities declare SQLite support but the provider \
909-
does not implement SessionFsSqliteProvider"
910-
.to_string(),
911-
));
912-
}
913-
}
903+
if self.inner.session_fs_sqlite_declared
904+
&& let Some(ref provider) = session_fs_provider
905+
&& provider.sqlite().is_none()
906+
{
907+
return Err(Error::InvalidConfig(
908+
"SessionFs capabilities declare SQLite support but the provider \
909+
does not implement SessionFsSqliteProvider"
910+
.to_string(),
911+
));
914912
}
915913

916914
if hooks.is_some() && config.hooks.is_none() {

0 commit comments

Comments
 (0)