Fix SQLX errors

This commit is contained in:
Geometrically
2020-12-31 19:09:23 -07:00
parent 0efeffeaa3
commit b8d2ef1eb5
4 changed files with 728 additions and 375 deletions

View File

@@ -1,6 +1,6 @@
use super::DatabaseError;
use crate::models::ids::random_base62_rng;
use sqlx_macros::Type;
use sqlx::sqlx_macros::Type;
const ID_RETRY_COUNT: usize = 20;

View File

@@ -264,7 +264,7 @@ async fn main() -> std::io::Result<()> {
let ignore_ips = dotenv::var("RATE_LIMIT_IGNORE_IPS")
.ok()
.and_then(|s| serde_json::from_str::<Vec<String>>(&s).ok())
.unwrap_or_else(|| vec![]);
.unwrap_or(vec![]);
if ignore_ips.contains(&ip) {
// At an even distribution of numbers, this will allow at the most