fn title_and_desc(attrs: &[Attribute]) -> (proc_macro2::TokenStream, proc_macro2::TokenStream) {
    let doc = doc_string(attrs);
    let mut split = doc.splitn(2, "\n\n");
    match (split.next(), split.next()) {
        (Some(title), Some(desc)) => (quote!(Some(#title.into())), quote!(Some(#desc.into()))),
        (Some(desc), None) => (quote!(None), quote!(Some(#desc.into()))),
        (None, None) => (quote!(None), quote!(None)),
        (None, _) => unreachable!(),
    }
}
/// Returns the summary of the doc (first paragraph) and the optional body (other paragraphs).
Returns the summary of the doc (first paragraph) and the optional body (other paragraphs).
Returns the summary of the doc ( first paragraph ) and the optional body ( other paragraphs ) .
fn title_and_desc(attrs: &[Attribute]) -> (proc_macro2::TokenStream, proc_macro2::TokenStream) {
    let doc = doc_string(attrs);
    let mut split = doc.splitn(2, "\n\n");
    match (split.next(), split.next()) {
        (Some(title), Some(desc)) => (quote!(Some(#title.into())), quote!(Some(#desc.into()))),
        (Some(desc), None) => (quote!(None), quote!(Some(#desc.into()))),
        (None, None) => (quote!(None), quote!(None)),
        (None, _) => unreachable!(),
    }
}
fn title_and_desc ( attrs : & [ Attribute ] ) -> ( proc_macro2 :: TokenStream , proc_macro2 :: TokenStream ) { let doc = doc_string ( attrs ) ; let mut split = doc . splitn ( 2 , " \n \n " ) ; match ( split . next ( ) , split . next ( ) ) { ( Some ( title ) , Some ( desc ) ) => ( quote ! ( Some ( title into ( ) ) ) , quote ! ( Some ( desc into ( ) ) ) ) , ( Some ( desc ) , None ) => ( quote ! ( None ) , quote ! ( Some ( desc into ( ) ) ) ) , ( None , None ) => ( quote ! ( None ) , quote ! ( None ) ) , ( None , _ ) => unreachable ! ( ) , } }
Returns the summary of the doc (first paragraph) and the optional body (other paragraphs).
Returns the summary of the doc ( first paragraph ) and the optional body ( other paragraphs ) .
attrs
&[Attribute]
attrs
&[Attribute]