Skip to content

Commit 48fd787

Browse files
TuntiiCopilot
andauthored
Update docs/cookbook/src/crates/rustapi_extras.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 42a0cd6 commit 48fd787

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/cookbook/src/crates/rustapi_extras.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ rustapi-extras = { version = "0.1.233", features = ["insight"] }
9898
use rustapi_extras::insight::{InsightLayer, InMemoryInsightStore, InsightConfig};
9999
use std::sync::Arc;
100100

101-
let store = Arc::new(InMemoryInsightStore::new());
101+
let store = Arc::new(InMemoryInsightStore::new(InMemoryInsightStore::default_capacity()));
102102
let config = InsightConfig::default();
103103

104104
let app = RustApi::new()
105-
.layer(InsightLayer::new(config, store.clone()));
105+
.state(store.clone())
106+
.layer(InsightLayer::with_config(config).with_store(store.clone()));
106107
```
107108

108109
### Accessing Data

0 commit comments

Comments
 (0)