diff --git a/tokio-util/Cargo.toml b/tokio-util/Cargo.toml index a73eec8799a..12f70be862e 100644 --- a/tokio-util/Cargo.toml +++ b/tokio-util/Cargo.toml @@ -42,7 +42,7 @@ futures-io = { version = "0.3.0", optional = true } futures-util = { version = "0.3.0", optional = true } pin-project-lite = "0.2.11" slab = { version = "0.4.4", optional = true } # Backs `DelayQueue` -tracing = { version = "0.1.25", default-features = false, features = ["std"], optional = true } +tracing = { version = "0.1.29", default-features = false, features = ["std"], optional = true } [target.'cfg(tokio_unstable)'.dependencies] hashbrown = { version = "0.14.0", default-features = false, optional = true } diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 4c5f7d46acb..b07f50150b7 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -101,7 +101,7 @@ socket2 = { version = "0.5.5", optional = true, features = [ "all" ] } # Currently unstable. The API exposed by these features may be broken at any time. # Requires `--cfg tokio_unstable` to enable. [target.'cfg(tokio_unstable)'.dependencies] -tracing = { version = "0.1.25", default-features = false, features = ["std"], optional = true } # Not in full +tracing = { version = "0.1.29", default-features = false, features = ["std"], optional = true } # Not in full # Currently unstable. The API exposed by these features may be broken at any time. # Requires `--cfg tokio_unstable` to enable. diff --git a/tokio/tests/tracing-instrumentation/tests/task.rs b/tokio/tests/tracing-instrumentation/tests/task.rs index e67349cb261..fb215ca7ce0 100644 --- a/tokio/tests/tracing-instrumentation/tests/task.rs +++ b/tokio/tests/tracing-instrumentation/tests/task.rs @@ -103,11 +103,9 @@ async fn task_spawn_sizes_recorded() { let task_span = expect::span() .named("runtime.spawn") .with_target("tokio::task") - .with_field( - expect::field("size.bytes") - .with_value(&size) - .and(expect::field("original_size.bytes").with_value(&size)), - ); + // TODO(hds): check that original_size.bytes is NOT recorded when this can be done in + // tracing-mock without listing every other field. + .with_field(expect::field("size.bytes").with_value(&size)); let (subscriber, handle) = subscriber::mock().new_span(task_span).run_with_handle(); @@ -129,12 +127,12 @@ async fn task_big_spawn_sizes_recorded() { let future = { async fn big() { let mut a = [0_u8; N]; - for idx in 0..N { - a[idx] = (idx % 256) as u8; + for (idx, item) in a.iter_mut().enumerate() { + *item = (idx % 256) as u8; } tokio::time::sleep(Duration::from_millis(10)).await; - for idx in 0..N { - assert_eq!(a[idx], (idx % 256) as u8); + for (idx, item) in a.iter_mut().enumerate() { + assert_eq!(*item, (idx % 256) as u8); } }