Fix match_single_binding clippy lint
@@ -64,13 +64,18 @@ impl FromStr for ConnectionUri {
type Err = String;
fn from_str(s: &str) -> Result<Self, Self::Err> {
- match s {
#[cfg(feature = "postgres")]
- _ if s.starts_with("postgres://") => Ok(ConnectionUri::Postgres(s.into())),
+ if s.starts_with("postgres://") {
+ return Ok(ConnectionUri::Postgres(s.into()));
+ }
+
#[cfg(feature = "sqlite")]
- _ => Ok(ConnectionUri::Sqlite(s.into())),
+ {
+ Ok(ConnectionUri::Sqlite(s.into()))
+ }
#[cfg(not(feature = "sqlite"))]
- _ => Err(format!("No compatible connection type: {}", s)),
+ {
+ Err(format!("No compatible connection type: {}", s))
}
}
}
