Skip to content

Commit

Permalink
update dbg example
Browse files Browse the repository at this point in the history
  • Loading branch information
KodrAus authored Jan 7, 2025
1 parent 5add5f8 commit b4fb57e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions book/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ Use the [`dbg!`](https://docs.rs/emit/0.11.0-alpha.21/emit/macro.dbg.html) macro

```rust
# extern crate emit;
#[emit::span("add {item} to {user} cart")]
async fn add_item(user: &str, item: &str) {
emit::dbg!(user, item);
let user = "user@example
com";
let id = 42;

// Your code goes here
}
emit::dbg!(user, id);
```

It works a lot like the standard library's `dbg!` macro, and is meant to be used as a quick, temporary debugging aid.
Expand Down

0 comments on commit b4fb57e

Please sign in to comment.