Skip to content

Commit

Permalink
point to async-trait's upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
nightmared committed Mar 5, 2021
1 parent 1123bed commit 7b49d8d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,3 @@ members = [
"tracing-journald",
"examples"
]

[patch.crates-io]
async-trait = { git = "https://github.com/nightmared/async-trait", branch = "test-tracing" }
2 changes: 1 addition & 1 deletion tracing-attributes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ quote = "1"
tracing = { path = "../tracing", version = "0.2" }
tokio-test = { version = "0.2.0" }
tracing-core = { path = "../tracing-core", version = "0.2"}
async-trait = "0.1"
async-trait = "0.1.44"

[badges]
maintenance = { status = "experimental" }
6 changes: 3 additions & 3 deletions tracing-attributes/tests/async_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,15 @@ fn async_fn_with_async_trait_and_fields_expressions() {
#[async_trait]
impl Test for TestImpl {
// check that self is correctly handled, even when using async_trait
#[instrument(fields(val=self.foo(), val2=Self::clone(self).foo(), test=%v+5))]
async fn call(&mut self, v: usize) {}
#[instrument(fields(val=self.foo(), val2=Self::clone(self).foo(), test=%_v+5))]
async fn call(&mut self, _v: usize) {}
}

let span = span::mock().named("call");
let (collector, handle) = collector::mock()
.new_span(
span.clone().with_field(
field::mock("v")
field::mock("_v")
.with_value(&tracing::field::debug(5))
.and(field::mock("test").with_value(&tracing::field::debug(10)))
.and(field::mock("val").with_value(&42u64))
Expand Down

0 comments on commit 7b49d8d

Please sign in to comment.