Skip to content

Commit 1b7911b

Browse files
committed
💥 Add #[must_use]
1 parent c9ea55e commit 1b7911b

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/events.rs

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ use crate::macros::event_converts;
5151
/// let payload = serde_json::from_str::<PingPayload>(payload).unwrap();
5252
/// let event = Event::Ping(payload);
5353
/// ```
54+
#[must_use]
5455
#[derive(Debug, Clone, PartialEq, Eq)]
5556
#[non_exhaustive]
5657
pub enum Event {
@@ -158,6 +159,7 @@ event_converts! {
158159
/// let event: Event = payload.into();
159160
/// assert_eq!(event.kind(), EventKind::Ping);
160161
/// ```
162+
#[must_use]
161163
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
162164
#[non_exhaustive]
163165
pub enum EventKind {

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub use events::{Event, EventKind};
1616
pub use parser::ParseError;
1717

1818
/// HTTP POSTリクエストのパーサー
19+
#[must_use]
1920
#[derive(Debug, Clone)]
2021
pub struct RequestParser {
2122
verification_token: String,

src/parser.rs

+1
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ impl RequestParser {
236236
/// let body = b"";
237237
/// assert_eq!(parser.parse(headers.iter(), body), Err(ParseError::ContentTypeNotFound));
238238
/// ```
239+
#[must_use]
239240
#[derive(Debug, Clone, PartialEq, Eq)]
240241
pub enum ParseError {
241242
ContentTypeNotFound,

0 commit comments

Comments
 (0)