Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stormshield-gt committed Nov 8, 2024
1 parent 5285da1 commit f1df00b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,8 @@ where
fn strip_wrap<T>(result: EndpointResult<T>) -> Result<WrapInfo, ClientError> {
trace!("Stripping wrap info from API response");
if let Some(w) = &result.warnings {
match w.is_empty() {
false => warn!("Server returned warnings with response: {:#?}", w),
true => {}
if !w.is_empty() {
warn!("Server returned warnings with response: {:#?}", w);
}
}
result.wrap_info.ok_or(ClientError::ResponseWrapError {})
Expand All @@ -369,9 +368,8 @@ where
{
trace!("Stripping response wrapper from API response");
if let Some(w) = &result.warnings {
match w.is_empty() {
false => warn!("Detected warnings in API response: {:#?}", w),
true => {}
if !w.is_empty() {
warn!("Detected warnings in API response: {:#?}", w);
}
}
result.data
Expand Down

0 comments on commit f1df00b

Please sign in to comment.