mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-05-03 21:52:49 +03: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:
parent
af35fdb48e
commit
8826f6df8f
3 changed files with 27 additions and 17 deletions
db/db-sqlx-postgres/src
|
@ -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::postgres::PgConnectOptions::from_str(
|
||||
&urlencoding::encode(&fresh.url),
|
||||
)
|
||||
.unwrap();
|
||||
let mut connect_options =
|
||||
sqlx::postgres::PgConnectOptions::from_str(&fresh.url).unwrap();
|
||||
if fresh.disable_logging {
|
||||
connect_options.disable_statement_logging();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue