Skip to content

Commit

Permalink
docs: update README accordingly
Browse files Browse the repository at this point in the history
Signed-off-by: YUE Daian <[email protected]>
  • Loading branch information
sheepduke committed Sep 27, 2023
1 parent b10acc7 commit 38beab8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ async fn example() {
// Note the `await` call here because asynchronous lock is used to guarantee thread safety.
let mut api = OpenFeature::singleton_mut().await;

api.set_provider(NoOpProvider::builder().int_value(100).build())
.await;

// Create an unnamed client.
let client = api.create_client();

Expand Down Expand Up @@ -96,6 +99,10 @@ async fn example() {
.await
.unwrap_or(false);

if is_feature_enabled {
// Do something.
}

// Let's get evaluation details.
let result = client
.get_int_details(
Expand Down

0 comments on commit 38beab8

Please sign in to comment.