Clean up dependencies

master
Nick Krichevsky 2022-10-16 21:20:53 -04:00
parent 91e2186466
commit 505b82d75f
4 changed files with 37 additions and 49 deletions

23
Cargo.lock generated
View File

@ -177,9 +177,9 @@ checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524"
[[package]]
name = "async-trait"
version = "0.1.53"
version = "0.1.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600"
checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f"
dependencies = [
"proc-macro2",
"quote",
@ -647,12 +647,6 @@ version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1"
[[package]]
name = "futures-timer"
version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c"
[[package]]
name = "futures-util"
version = "0.3.24"
@ -1852,13 +1846,13 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "syn"
version = "1.0.92"
version = "1.0.102"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52"
checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1"
dependencies = [
"proc-macro2",
"quote",
"unicode-xid",
"unicode-ident",
]
[[package]]
@ -2121,12 +2115,6 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
[[package]]
name = "unicode-xid"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04"
[[package]]
name = "url"
version = "2.3.1"
@ -2400,7 +2388,6 @@ dependencies = [
"derive-getters",
"fern",
"futures",
"futures-timer",
"itertools",
"log",
"mailparse",

View File

@ -6,27 +6,27 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
anyhow = "1.0"
async-imap = "0.6.0"
async-trait = "0.1.53"
clap = { version = "4.0", features = ["derive"] }
chrono = "0.4.22"
derive-getters = "0.2.0"
log = "0.4.17"
fern = "0.6.1"
itertools = "0.10.4"
mailparse = "0.13.8"
scraper = "0.13.0"
regex = "1.6"
reqwest = { version = "0.11.12", features = ["json"] }
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.8.24"
serde_json = "1.0"
derive-getters = "0.2.0"
async-imap = "0.6.0"
mailparse = "0.13.8"
tokio = { version = "1.18", features = ["full"] }
thiserror = "1.0"
log = "0.4.17"
simplelog = "0.12.0"
async-trait = "0.1.53"
scraper = "0.13.0"
itertools = "0.10.4"
fern = "0.6.1"
chrono = "0.4.22"
regex = "1.6"
reqwest = { version = "0.11.12", features = ["json"] }
thiserror = "1.0"
tokio = { version = "1.18", features = ["full"] }
url = "2.2"
anyhow = "1.0"
uuid = { version = "1.2", features = ["v4"] }
clap = { version = "4.0", features = ["derive"] }
# For annoying reasons, we must pin exactly the same versions as async-imap if we want to use
# their types.
@ -41,5 +41,4 @@ futures = "0.3.24"
[dev-dependencies]
textwrap = "0.15.0"
futures-timer = "3.0"
test-case = "2.2"

View File

@ -324,13 +324,13 @@ mod tests {
use crate::testutil::TokioSpawner;
use super::*;
use futures::stream;
use futures::{
channel::oneshot::{self, Sender},
select, StreamExt,
StreamExt,
};
use futures::{stream, FutureExt};
use futures_timer::Delay;
use thiserror::Error;
use tokio::time;
#[derive(Error, Debug)]
struct StringError(String);
@ -424,13 +424,13 @@ mod tests {
)
.expect("failed to setup stream");
select! {
msg = broker_handle.next().fuse() => assert_eq!(
"hello, world!".bytes().collect::<Vec<u8>>(),
msg.expect("empty channel").raw(),
),
_ = Delay::new(Duration::from_secs(5)).fuse() => panic!("test timed out"),
};
let msg = time::timeout(Duration::from_secs(5), broker_handle.next())
.await
.expect("test timed out");
assert_eq!(
"hello, world!".bytes().collect::<Vec<u8>>(),
msg.expect("empty channel").raw(),
);
}
#[tokio::test]
@ -449,9 +449,10 @@ mod tests {
message_stream.close().await;
select! {
res = rx.fuse() => assert!(res.is_ok(), "did not get close signal"),
_ = Delay::new(Duration::from_secs(5)).fuse() => panic!("test timed out"),
};
let rx_res = time::timeout(Duration::from_secs(5), rx)
.await
.expect("test timed out");
rx_res.expect("did not get close signal");
}
}

View File

@ -30,6 +30,7 @@ mod tests {
use super::*;
use stop_token::StopSource;
use tokio::time;
#[tokio::test]
async fn test_resolves_future_if_unstopped() {
@ -43,7 +44,7 @@ mod tests {
async fn test_gives_none_if_stopped() {
// We must artificially limit how long this future takes to resolve,
// as it is random which future resolves by select! if two are ready.
let fut = tokio::time::sleep(Duration::from_secs(5));
let fut = time::sleep(Duration::from_secs(5));
let stop_source = StopSource::new();
let mut stop_token = stop_source.token();