Skip to content

Commit

Permalink
docs(README): update MemoryLoader example (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k authored Sep 27, 2023
1 parent 9148ecb commit fab232b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ loading them is not practical or desirable.
A minimal example would look like this:

```rust
use deno_graph::create_graph;
use deno_graph::ModuleSpecifier;
use deno_graph::ModuleGraph;
use deno_graph::GraphKind;
use deno_graph::source::MemoryLoader;
use deno_graph::source::Source;
use futures::executor::block_on;
Expand Down Expand Up @@ -98,7 +99,7 @@ fn main() {
let future = async move {
let mut graph = ModuleGraph::new(GraphKind::All);
graph.build(roots, &mut loader, Default::default()).await;
println!("{}", graph);
println!("{:#?}", graph);
};
block_on(future)
}
Expand Down

0 comments on commit fab232b

Please sign in to comment.