From 26f9bfc30945f1e8f92cd1c70d4dff3aa22e965a Mon Sep 17 00:00:00 2001 From: Yihau Chen Date: Tue, 13 Aug 2024 23:47:15 +0800 Subject: [PATCH] docs: fix coption doc test (#2571) * docs: fix coption doc test * Update sdk/program/src/program_option.rs Co-authored-by: Brooks * Update sdk/program/src/program_option.rs Co-authored-by: Brooks --------- Co-authored-by: Brooks --- sdk/program/src/program_option.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/program/src/program_option.rs b/sdk/program/src/program_option.rs index b1a7c18d8a75a0..3496e5c282a804 100644 --- a/sdk/program/src/program_option.rs +++ b/sdk/program/src/program_option.rs @@ -171,7 +171,8 @@ impl COption { /// assert_eq!(x.expect("the world is ending"), "value"); /// ``` /// - /// ```ignore{.should_panic} + /// ```should_panic + /// # use solana_program::program_option::COption; /// let x: COption<&str> = COption::None; /// x.expect("the world is ending"); // panics with `the world is ending` /// ``` @@ -203,7 +204,8 @@ impl COption { /// assert_eq!(x.unwrap(), "air"); /// ``` /// - /// ```ignore{.should_panic} + /// ```should_panic + /// # use solana_program::program_option::COption; /// let x: COption<&str> = COption::None; /// assert_eq!(x.unwrap(), "air"); // fails /// ```