Skip to content

Commit f605235

Browse files
committed
Fix up cargo lint
1 parent 8516651 commit f605235

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rust/ruby-prism/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,9 @@ pub struct Comment<'pr> {
354354
/// The type of the comment
355355
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
356356
pub enum CommentType {
357-
/// InlineComment corresponds to comments that start with #.
357+
/// `InlineComment` corresponds to comments that start with #.
358358
InlineComment,
359-
/// EmbDocComment corresponds to comments that are surrounded by =begin and =end.
359+
/// `EmbDocComment` corresponds to comments that are surrounded by =begin and =end.
360360
EmbDocComment,
361361
}
362362

@@ -371,6 +371,7 @@ impl<'pr> Comment<'pr> {
371371
}
372372

373373
/// Returns the type of the comment.
374+
#[must_use]
374375
pub fn type_(&self) -> CommentType {
375376
let type_ = unsafe { self.content.as_ref().type_ };
376377
if type_ == pm_comment_type_t::PM_COMMENT_EMBDOC {

0 commit comments

Comments
 (0)