diff --git a/parsers/rust/Cargo.lock b/parsers/rust/Cargo.lock index ca0e322..9cffc0c 100644 --- a/parsers/rust/Cargo.lock +++ b/parsers/rust/Cargo.lock @@ -3,23 +3,25 @@ version = 3 [[package]] -name = "anyhow" -version = "1.0.60" +name = "addr2line" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c794e162a5eff65c72ef524dfe393eb923c354e350bb78b9c7383df13f3bc142" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] [[package]] -name = "async-compat" -version = "0.2.1" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b48b4ff0c2026db683dea961cd8ea874737f56cffca86fa84415eaddc51c00d" -dependencies = [ - "futures-core", - "futures-io", - "once_cell", - "pin-project-lite", - "tokio", -] +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "anyhow" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c794e162a5eff65c72ef524dfe393eb923c354e350bb78b9c7383df13f3bc142" [[package]] name = "async-stream" @@ -39,7 +41,7 @@ checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] @@ -60,6 +62,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "bumpalo" version = "3.11.0" @@ -72,6 +89,15 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -154,7 +180,7 @@ checksum = "0db9cce532b0eae2ccf2766ab246f114b56b9cf6d445e00c2549fbc100ca045d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] @@ -187,6 +213,12 @@ dependencies = [ "slab", ] +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + [[package]] name = "js-sys" version = "0.3.59" @@ -196,6 +228,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "libc" +version = "0.2.150" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" + [[package]] name = "log" version = "0.4.17" @@ -217,12 +255,30 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + [[package]] name = "new_debug_unreachable" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.13.1" @@ -243,22 +299,28 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.21" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "scoped-tls" version = "1.0.0" @@ -276,16 +338,16 @@ dependencies = [ [[package]] name = "subtext" -version = "0.3.2" +version = "0.3.4" dependencies = [ "anyhow", - "async-compat", "async-stream", "async-utf8-decoder", "futures", "log", "tendril", "tokio", + "tokio-util", "wasm-bindgen-test", ] @@ -300,6 +362,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "tendril" version = "0.4.3" @@ -328,32 +401,45 @@ checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] name = "tokio" -version = "1.20.1" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a8325f63a7d4774dd041e363b2409ed1c5cbbd0f867795e661df066b2b0a581" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes", - "memchr", - "once_cell", "pin-project-lite", "tokio-macros", ] [[package]] name = "tokio-macros" -version = "1.8.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.39", +] + +[[package]] +name = "tokio-util" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +dependencies = [ + "bytes", + "futures-core", + "futures-io", + "futures-sink", + "pin-project-lite", + "tokio", ] [[package]] @@ -389,7 +475,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.99", "wasm-bindgen-shared", ] @@ -423,7 +509,7 @@ checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/parsers/rust/subtext/Cargo.toml b/parsers/rust/subtext/Cargo.toml index 57c01f6..31b1e66 100644 --- a/parsers/rust/subtext/Cargo.toml +++ b/parsers/rust/subtext/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" edition = "2021" [features] -stream = ["tokio", "async-stream", "futures", "async-compat", "async-utf8-decoder"] +stream = ["tokio", "tokio-util", "async-stream", "futures", "async-utf8-decoder"] [dependencies] tendril = "~0.4" @@ -15,9 +15,9 @@ log = "~0.4" # For stream parsing only.... tokio = { version = "^1", features = ["io-util", "macros", "test-util"], optional = true } +tokio-util = { version = "0.7", features = ["compat"], optional = true } async-stream = { version = "~0.3", optional = true } futures = { version = "~0.3", optional = true } -async-compat = { version = "~0.2", optional = true } async-utf8-decoder = { version = "~0.3", optional = true } [dev-dependencies] diff --git a/parsers/rust/subtext/src/stream.rs b/parsers/rust/subtext/src/stream.rs index 9377fed..d4dd5cd 100644 --- a/parsers/rust/subtext/src/stream.rs +++ b/parsers/rust/subtext/src/stream.rs @@ -1,9 +1,9 @@ use anyhow::{anyhow, Result}; -use async_compat::CompatExt; use async_stream::try_stream; use async_utf8_decoder::Utf8Decoder; use futures::{Stream, StreamExt}; use tokio::io::AsyncRead; +use tokio_util::compat::TokioAsyncReadCompatExt; use crate::{block::Block, parse, primitive::Entity}; @@ -56,9 +56,9 @@ where #[cfg(test)] mod tests { - use async_compat::CompatExt; - use futures::{channel::mpsc, io, SinkExt}; - use futures::{pin_mut, StreamExt, TryStream, TryStreamExt}; + use futures::{channel::mpsc, SinkExt}; + use futures::{pin_mut, StreamExt, TryStreamExt}; + use tokio_util::compat::{FuturesAsyncReadCompatExt}; use crate::block::Block; use crate::primitive::Entity;