From 5189b700558843f279e2eb72c19082a8c8714eef Mon Sep 17 00:00:00 2001 From: YUE Daian Date: Wed, 27 Sep 2023 13:12:27 +0800 Subject: [PATCH] docs: update README accordingly --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 8637df3..c25f9e1 100644 --- a/README.md +++ b/README.md @@ -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(); @@ -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(