From b6139c36a8e2e7f115da938c02e5902740d6a281 Mon Sep 17 00:00:00 2001 From: eZio Pan Date: Fri, 9 Jun 2023 21:29:41 +0800 Subject: [PATCH 1/2] let readable field fetch doc from svd description --- src/generate/register.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generate/register.rs b/src/generate/register.rs index f552b469..3b790e25 100644 --- a/src/generate/register.rs +++ b/src/generate/register.rs @@ -805,7 +805,7 @@ pub fn fields( span, ); - let doc = format!("Checks if the value of the field is `{pc}`"); + let doc = util::escape_special_chars(&util::respace(&v.doc)); enum_items.extend(quote! { #[doc = #doc] #inline From 3d5099bd3bf170f43abfcc9b4c40029166f32247 Mon Sep 17 00:00:00 2001 From: eZio Pan Date: Fri, 9 Jun 2023 22:05:30 +0800 Subject: [PATCH 2/2] Update CHANGELOG.md for readable field doc change --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f837518..65dc7bbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] - Updated syn to version 2 (#732) +- Let readable field fetch doc from svd description (#734) ## [v0.29.0] - 2023-06-05