We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 813dea1 commit be1f041Copy full SHA for be1f041
1 file changed
src/comments.rs
@@ -102,6 +102,14 @@ impl CommentKind {
102
Self::MultiLine(comment) | Self::SingleLine(comment) => comment,
103
}
104
105
+ /// Setter method for setting the comment value
106
+ pub fn set_comment(&mut self, text: &str) {
107
+ match self {
108
+ Self::MultiLine(s) | Self::SingleLine(s) => {
109
+ *s = text.to_owned();
110
+ }
111
112
113
114
115
/// Structure for containing the [`CommentKind`] and the [`Span`] for a comment
0 commit comments