Skip to content

Commit

Permalink
fix(proc-macros): trim docstring lines
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitjes committed Dec 1, 2023
1 parent 074270a commit 4109574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uniffi_macros/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ pub(crate) fn extract_docstring(attrs: &[Attribute]) -> syn::Result<String> {
let name_value = attr.meta.require_name_value()?;
if let Expr::Lit(expr) = &name_value.value {
if let Lit::Str(lit_str) = &expr.lit {
return Ok(lit_str.value());
return Ok(lit_str.value().trim().to_owned());
}
}
Err(syn::Error::new_spanned(attr, "Cannot parse doc attribute"))
Expand Down

0 comments on commit 4109574

Please sign in to comment.