Skip to content

Commit 52b3ef8

Browse files
TuntiiCopilot
andauthored
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1723f79 commit 52b3ef8

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

docs/cookbook/src/crates/rustapi_extras.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,11 @@ The `replay` feature allows you to record production traffic and replay it local
283283
See the [Time-Travel Debugging Recipe](../recipes/replay.md) for full details.
284284

285285
```rust
286-
use rustapi_extras::replay::{ReplayLayer, InMemoryReplayStore};
286+
use rustapi_extras::replay::{ReplayLayer, ReplayConfig, InMemoryReplayStore};
287+
288+
let replay_config = ReplayConfig::default();
289+
let store = InMemoryReplayStore::new(1_000);
287290

288291
let app = RustApi::new()
289-
.layer(ReplayLayer::new(InMemoryReplayStore::new()));
292+
.layer(ReplayLayer::new(replay_config).with_store(store));
290293
```

0 commit comments

Comments
 (0)