Skip to content

Commit

Permalink
refactor: replace tokio-stream with futures-core
Browse files Browse the repository at this point in the history
This conveniently isn't breaking, because `tokio_stream::Stream` was simply a re-export of `futures_core::Stream`.
  • Loading branch information
decahedron1 committed Oct 28, 2024
1 parent 18c090d commit bed1f0e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ glam = "0.29"
nom = { version = "7.1", default-features = false, features = [ "alloc" ] }
serde = { version = "1.0", optional = true, features = [ "derive" ] }
tokio = { version = "1.30", features = [ "net" ] }
tokio-stream = "0.1"
futures-core = "0.3"
thiserror = "1.0"

[dev-dependencies]
glam = { version = "0.29", features = [ "approx" ] }
tokio = { version = "1.30", features = [ "net", "macros", "signal", "rt-multi-thread" ] }
tokio-test = "0.4"
futures-util = "0.3"
approx = "0.5"
rmp-serde = "1.1"
console = "0.15"
Expand Down
2 changes: 1 addition & 1 deletion examples/marionette.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::collections::HashMap;

use tokio_stream::StreamExt;
use futures_util::StreamExt;
use vmc::{VMCMessage, VMCModelState, VMCResult};

#[tokio::main]
Expand Down
2 changes: 1 addition & 1 deletion examples/recorder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use std::sync::{
};

use console::Term;
use futures_util::StreamExt;
use serde::Serialize;
use tokio_stream::StreamExt;
use vmc::{VMCMessage, VMCResult};

#[derive(Default, Serialize)]
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ use std::{
task::{Context, Poll}
};

use futures_core::Stream;
use tokio::net::{ToSocketAddrs, UdpSocket};
use tokio_stream::Stream;

mod error;
pub mod message;
Expand Down
2 changes: 1 addition & 1 deletion src/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use std::{
task::{Context, Poll}
};

use futures_core::Stream;
use tokio::net::UdpSocket;
use tokio_stream::Stream;

pub(crate) type RecvFuture = Pin<Box<dyn Future<Output = io::Result<(Vec<u8>, usize, SocketAddr)>> + Send + Sync>>;

Expand Down

0 comments on commit bed1f0e

Please sign in to comment.