Skip to content

Commit f7764d5

Browse files
committed
Fix doc test in wp_api
1 parent f6f3603 commit f7764d5

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

wp_api/src/posts.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -522,23 +522,8 @@ impl_as_query_value_from_to_string!(PostStatus);
522522
///
523523
/// This is a helper function for platform code that can't access the `FromStr` trait
524524
/// directly due to UniFFI limitations.
525-
///
526-
/// # Examples
527-
/// ```
528-
/// use wp_api::parse_post_status;
529-
/// use wp_api::PostStatus;
530-
///
531-
/// let status = parse_post_status("draft");
532-
/// assert_eq!(status, Some(PostStatus::Draft));
533-
///
534-
/// let status = parse_post_status("publish");
535-
/// assert_eq!(status, Some(PostStatus::Publish));
536-
///
537-
/// let status = parse_post_status("custom_status");
538-
/// assert_eq!(status, Some(PostStatus::Custom("custom_status".to_string())));
539-
/// ```
540525
#[uniffi::export]
541-
pub fn parse_post_status(s: &str) -> Option<PostStatus> {
526+
fn parse_post_status(s: &str) -> Option<PostStatus> {
542527
use std::str::FromStr;
543528
PostStatus::from_str(s).ok()
544529
}

0 commit comments

Comments
 (0)