mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
Fix compiling
- I made some mistakes while checking my two previous PRs(Seems like I don't understand Rust that great after all). - Do the url encoding only on the password part, not only the whole URL. - Fix `temporary value dropped while borrowed` compile error.
This commit is contained in:
@@ -68,10 +68,8 @@ impl Connect for ConnectionOptions {
|
||||
async fn connect(self) -> DBResult<Self::Pool> {
|
||||
let pool = match self {
|
||||
Self::Fresh(fresh) => {
|
||||
let mut connect_options = sqlx::mysql::MySqlConnectOptions::from_str(
|
||||
&urlencoding::encode(&fresh.url),
|
||||
)
|
||||
.unwrap();
|
||||
let mut connect_options =
|
||||
sqlx::mysql::MySqlConnectOptions::from_str(&fresh.url).unwrap();
|
||||
if fresh.disable_logging {
|
||||
connect_options.disable_statement_logging();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user