Skip to content

Commit

Permalink
✅ Fix async test
Browse files Browse the repository at this point in the history
  • Loading branch information
rster2002 committed May 14, 2024
1 parent 9b44fe7 commit b7d0880
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
53 changes: 53 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions ed-journals/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ notify = "6.1.1"
tokio = { version = "1.37.0", features = ["fs", "sync", "io-util"], default-features = false, optional = true }
async-mutex = { version = "1.4.0", optional = true }

[dev-dependencies]
tokio-test = "0.4.4"

[features]
default = []
asynchronous = ["dep:tokio", "dep:async-mutex"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ use crate::modules::logs::LogFileError;
/// reads all files. Once all historic files have been read the current read will only resolve once
/// the newest log file is changed at which it will read the active log file and return the entry.
///
/// ```no_run
/// ```rust
/// use std::path::PathBuf;
/// use ed_journals::logs::asynchronous::LiveLogDirReader;
///
/// # tokio_test::block_on(async {
/// let path = PathBuf::from("somePath");
///
/// let mut live_dir_reader = LiveLogDirReader::open(path)
Expand All @@ -33,6 +34,7 @@ use crate::modules::logs::LogFileError;
/// while let Some(entry) = live_dir_reader.next().await {
/// // Do something with the entry
/// }
/// # });
/// ```
#[derive(Debug)]
pub struct LiveLogDirReader {
Expand Down

0 comments on commit b7d0880

Please sign in to comment.