Auto-fix clippy::collapsible_if violations (#36428)
Release Notes: - N/A
This commit is contained in:
parent
9e8ec72bd5
commit
8f567383e4
281 changed files with 6628 additions and 7089 deletions
|
@ -106,10 +106,9 @@ pub fn validate_generate_content_request(request: &GenerateContentRequest) -> Re
|
|||
.contents
|
||||
.iter()
|
||||
.find(|content| content.role == Role::User)
|
||||
&& user_content.parts.is_empty()
|
||||
{
|
||||
if user_content.parts.is_empty() {
|
||||
bail!("User content must contain at least one part");
|
||||
}
|
||||
bail!("User content must contain at least one part");
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue