Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes (attempt 2/3)
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Aug 22, 2024
1 parent a2a791d commit cd087d2
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions ee/tabby-webserver/src/service/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,15 @@ impl ThreadService for ThreadServiceImpl {
message: &CreateMessageInput,
) -> Result<()> {
let thread_id = thread_id.as_rowid()?;
let client_code = message
.attachments
.as_ref()
.and_then(|x| {
let code = x.code.iter().map(Into::into).collect::<Vec<_>>();
// If there are no code attachments, return None
if code.is_empty() {
None
} else {
Some(code)
}
});
let client_code = message.attachments.as_ref().and_then(|x| {
let code = x.code.iter().map(Into::into).collect::<Vec<_>>();
// If there are no code attachments, return None
if code.is_empty() {
None
} else {
Some(code)
}
});

self.db
.create_thread_message(
Expand Down

0 comments on commit cd087d2

Please sign in to comment.