Skip to content

Commit d5cb171

Browse files
committed
chore: fixes after review
1 parent 042efc6 commit d5cb171

File tree

1 file changed

+4
-6
lines changed
  • lambda-events/src/event/sqs

1 file changed

+4
-6
lines changed

lambda-events/src/event/sqs/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl SqsBatchResponse {
168168
///
169169
/// # Example
170170
///
171-
/// ```rust,no_run
171+
/// ```rust
172172
/// use aws_lambda_events::event::sqs::{SqsEvent, SqsBatchResponse};
173173
/// use lambda_runtime::{service_fn, Error, LambdaEvent};
174174
///
@@ -206,8 +206,7 @@ impl SqsBatchResponse {
206206
pub fn add_failure(&mut self, message_id: impl Into<String>) {
207207
self.batch_item_failures.push(BatchItemFailure {
208208
item_identifier: message_id.into(),
209-
#[cfg(feature = "catch-all-fields")]
210-
other: serde_json::Map::new(),
209+
..Default::default()
211210
});
212211
}
213212

@@ -222,7 +221,7 @@ impl SqsBatchResponse {
222221
///
223222
/// # Example
224223
///
225-
/// ```rust,no_run
224+
/// ```rust
226225
/// use aws_lambda_events::event::sqs::{SqsEvent, SqsBatchResponse};
227226
/// use lambda_runtime::{service_fn, Error, LambdaEvent};
228227
///
@@ -267,8 +266,7 @@ impl SqsBatchResponse {
267266
.into_iter()
268267
.map(|id| BatchItemFailure {
269268
item_identifier: id.into(),
270-
#[cfg(feature = "catch-all-fields")]
271-
other: serde_json::Map::new(),
269+
..Default::default()
272270
})
273271
.collect();
274272
}

0 commit comments

Comments
 (0)