Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/build/smart-contracts/example-contracts/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ fn test() {
assert_eq!(client.increment(), 1);
assert_eq!(
env.events().all(),
std::vec![IncrementEvent { count: 1 }.to_xdr(&env, &contract_id)]
[IncrementEvent { count: 1 }.to_xdr(&env, &contract_id)]
Comment thread
leighmcculloch marked this conversation as resolved.
);

// Assert on the events emitted by the last contract invocation that
Expand All @@ -200,7 +200,7 @@ fn test() {
assert_eq!(client.increment(), 2);
assert_eq!(
env.events().all().filter_by_contract(&contract_id),
std::vec![IncrementEvent { count: 2 }.to_xdr(&env, &contract_id)]
[IncrementEvent { count: 2 }.to_xdr(&env, &contract_id)]
);

// Assert on the events emitted by the last contract invocation by
Expand Down Expand Up @@ -254,7 +254,7 @@ The event struct defined with `#[contractevent]` can be converted to its XDR for
```rust
assert_eq!(
env.events().all(),
std::vec![IncrementEvent { count: 1 }.to_xdr(&env, &contract_id)]
[IncrementEvent { count: 1 }.to_xdr(&env, &contract_id)]
);
```

Expand All @@ -263,7 +263,7 @@ assert_eq!(
```rust
assert_eq!(
env.events().all().filter_by_contract(&contract_id),
std::vec![IncrementEvent { count: 2 }.to_xdr(&env, &contract_id)]
[IncrementEvent { count: 2 }.to_xdr(&env, &contract_id)]
);
```

Expand Down