Skip to content

Commit

Permalink
Use current_thread in examples to reduce dependent features
Browse files Browse the repository at this point in the history
  • Loading branch information
bradfier committed Feb 3, 2024
1 parent a52193b commit 4ffa2d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rmonitor"
version = "0.2.0"
version = "0.3.0"
license = "MIT/Apache-2.0"
readme = "README.md"
authors = ["Richard Bradfield <[email protected]>"]
Expand All @@ -18,6 +18,6 @@ edition = "2018"

[dependencies]
thiserror = "1.0"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "net", "io-util", "time", "macros"] }
tokio = { version = "1", features = ["rt", "net", "io-util", "time", "macros"] }
tokio-util = { version = "0.7", features = ["codec"] }
futures = "0.3.30"
2 changes: 1 addition & 1 deletion examples/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tokio::net::TcpStream;
use tokio::time::timeout;
use tokio_util::codec::FramedRead;

#[tokio::main]
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn Error>> {
let stream = TcpStream::connect("127.0.0.1:50000").await?;

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//! use futures::stream::StreamExt;
//! use tokio_util::codec::FramedRead;
//!
//! #[tokio::main]
//! #[tokio::main(flavor = "current_thread")]
//! async fn main() -> Result<(), Box<dyn Error>> {
//! // Connect to an RMonitor server
//! let stream = TcpStream::connect("127.0.0.1:4000").await?;
Expand Down

0 comments on commit 4ffa2d8

Please sign in to comment.