From 69cb4fd41662a32f86c5116ba5551f7a22f718a3 Mon Sep 17 00:00:00 2001 From: sacha <23283108+sacha-l@users.noreply.github.com> Date: Fri, 13 Dec 2024 18:23:46 +0700 Subject: [PATCH] fix: make README compile --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 34fc71e8..b9dcfc93 100644 --- a/README.md +++ b/README.md @@ -262,6 +262,7 @@ Here’s how you can set up and use SwarmNL's replication capabilities: #### Configuring a Node for Replication ```rust + #![cfg_attr(not(doctest))] //! Configure the node for replication with a strong consistency model // Define the replica network ID @@ -291,6 +292,7 @@ Here’s how you can set up and use SwarmNL's replication capabilities: SwarmNL exposes network events to your application, allowing you to process incoming replica data effectively. ```rust + #![cfg_attr(not(doctest))] // Listen for replication events loop { // Check for incoming data events @@ -336,7 +338,7 @@ Here’s how you can set up and use SwarmNL's sharding capabilities: #### Configuring a node for sharding ```rust - + #![cfg_attr(not(doctest))] //! Configure a node for sharding operations /// The constant id of the sharded network. Should be kept as a secret. @@ -429,6 +431,7 @@ Here’s how you can set up and use SwarmNL's sharding capabilities: #### Choosing a sharding algorithm and storing data on the network ```rust + #![cfg_attr(not(doctest))] //! Select a sharding algorithm and assign nodes to their respective shards // Initialize the hash-based sharding policy @@ -489,6 +492,7 @@ Here’s how you can set up and use SwarmNL's sharding capabilities: A node can receive data either through forwarding from a node in another shard or via replication from a peer node in the same shard. Below is an example demonstrating how to listen for and handle both types of events. ```rust + #![cfg_attr(not(doctest))] loop { // Check for incoming data events if let Some(event) = node.next_event().await {