diff --git a/Cargo.lock b/Cargo.lock index 345bf94..4a64855 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -47,7 +47,6 @@ dependencies = [ "tokio-postgres", "tokio-stream", "tokio-util", - "url", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 3c90c0f..08873af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,4 +24,3 @@ tokio = { version = "1.47.1", features = ["full"] } tokio-postgres = { version = "0.7.13", features = ["with-chrono-0_4", "with-serde_json-1"] } tokio-stream = { version = "0.1.17", features = ["io-util"] } tokio-util = { version = "0.7.16", features = ["compat"] } -url = "2.5.7" diff --git a/src/bin/allegedly.rs b/src/bin/allegedly.rs index 9caee9b..c45071a 100644 --- a/src/bin/allegedly.rs +++ b/src/bin/allegedly.rs @@ -3,9 +3,9 @@ use allegedly::{ bin_init, pages_to_pg, pages_to_weeks, poll_upstream, }; use clap::{Parser, Subcommand}; +use reqwest::Url; use std::{path::PathBuf, time::Instant}; use tokio::sync::{mpsc, oneshot}; -use url::Url; #[derive(Debug, Parser)] struct Cli { diff --git a/src/poll.rs b/src/poll.rs index e2df0f4..5a37a13 100644 --- a/src/poll.rs +++ b/src/poll.rs @@ -1,8 +1,8 @@ use crate::{CLIENT, Dt, ExportPage, Op, OpKey}; +use reqwest::Url; use std::time::Duration; use thiserror::Error; use tokio::sync::mpsc; -use url::Url; // plc.directory ratelimit on /export is 500 per 5 mins const UPSTREAM_REQUEST_INTERVAL: Duration = Duration::from_millis(600); diff --git a/src/weekly.rs b/src/weekly.rs index 07a2aea..e6fe5e7 100644 --- a/src/weekly.rs +++ b/src/weekly.rs @@ -2,6 +2,7 @@ use crate::{CLIENT, Dt, ExportPage, Op}; use async_compression::tokio::bufread::GzipDecoder; use async_compression::tokio::write::GzipEncoder; use core::pin::pin; +use reqwest::Url; use std::future::Future; use std::ops::{Bound, RangeBounds}; use std::path::PathBuf; @@ -12,7 +13,6 @@ use tokio::{ }; use tokio_stream::wrappers::LinesStream; use tokio_util::compat::FuturesAsyncReadCompatExt; -use url::Url; const WEEK_IN_SECONDS: i64 = 7 * 86_400;