refactor: update dependencies

This commit is contained in:
Anna 2023-07-19 12:13:33 -04:00
parent 089d371610
commit eb17e8a028
4 changed files with 951 additions and 489 deletions

1416
server/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -12,22 +12,22 @@ fern = "0.6"
futures-util = "0.3"
hex = "0.4"
lazy_static = "1"
lodestone-scraper = { git = "https://git.annaclemens.io/ascclemens/lodestone-scraper.git" }
lodestone-scraper = { git = "https://git.anna.lgbt/ascclemens/lodestone-scraper.git" }
log = "0.4"
parking_lot = "0.12"
prefixed-api-key = { git = "https://git.annaclemens.io/ascclemens/prefixed-api-key.git" }
prefixed-api-key = { git = "https://git.anna.lgbt/ascclemens/prefixed-api-key.git" }
rand = "0.8"
regex = "1"
reqwest = { version = "0.11", default-features = false }
rmp-serde = "1"
rustyline = { version = "10", default-features = false }
rustyline = { version = "12", default-features = false }
serde = { version = "1", features = ["derive"] }
serde_bytes = "0.11"
serde_repr = "0.1"
sha3 = "0.10"
sqlx = { version = "0.6", features = ["runtime-tokio-rustls", "sqlite", "chrono"] }
tokio-tungstenite = "0.17"
toml = "0.5"
sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "sqlite", "chrono"] }
tokio-tungstenite = "0.19"
toml = "0.7"
url = { version = "2", features = ["serde"] }
uuid = { version = "1", features = ["serde", "v4"] }

View File

@ -0,0 +1,2 @@
[toolchain]
channel = 'nightly'

View File

@ -10,6 +10,7 @@ use anyhow::{Context, Result};
use futures_util::{SinkExt, StreamExt};
use lodestone_scraper::lodestone_parser::ffxiv_types::World;
use log::{debug, error, info, Level, LevelFilter, warn};
use rustyline::history::DefaultHistory;
use sha3::Digest;
use sqlx::{ConnectOptions, Executor, Pool, Sqlite};
use sqlx::migrate::Migrator;
@ -107,8 +108,9 @@ async fn main() -> Result<()> {
.context("couldn't parse config file")?;
// set up database pool
let mut options = SqliteConnectOptions::new();
options.log_statements(LevelFilter::Debug);
let options = SqliteConnectOptions::new()
.log_statements(LevelFilter::Debug)
.filename(&config.database.path);
let pool = SqlitePoolOptions::new()
.after_connect(|conn, _| Box::pin(async move {
@ -118,7 +120,7 @@ async fn main() -> Result<()> {
).await?;
Ok(())
}))
.connect_with(options.filename(&config.database.path))
.connect_with(options)
.await
.context("could not connect to database")?;
MIGRATOR.run(&pool)
@ -145,7 +147,7 @@ async fn main() -> Result<()> {
let (announce_tx, mut announce_rx) = tokio::sync::mpsc::channel(1);
std::thread::spawn(move || {
let mut editor = match rustyline::Editor::<()>::new() {
let mut editor = match rustyline::Editor::<(), DefaultHistory>::new() {
Ok(e) => e,
Err(e) => {
error!("error creating line editor: {:#?}", e);