Skip to content

Commit ca5bdff

Browse files
psteinroeclaude
andcommitted
refactor: use payload.to_string() instead of serde_json::to_string
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5ab4126 commit ca5bdff

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/sink/sqs.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,17 +198,9 @@ impl Sink for SqsSink {
198198
let mut entries = Vec::with_capacity(chunk.len());
199199

200200
for (idx, event) in chunk {
201-
let message_body = serde_json::to_string(&event.payload).map_err(|e| {
202-
etl::etl_error!(
203-
etl::error::ErrorKind::InvalidData,
204-
"Failed to serialize payload to JSON",
205-
e.to_string()
206-
)
207-
})?;
208-
209201
let entry = SendMessageBatchRequestEntry::builder()
210202
.id(idx.to_string())
211-
.message_body(message_body)
203+
.message_body(event.payload.to_string())
212204
.build()
213205
.map_err(|e| {
214206
etl::etl_error!(

0 commit comments

Comments
 (0)