mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
clippy: Fix collapsible_if warnings (#31852)
This commit is contained in:
parent
3d10dbae32
commit
a53632c0e5
11 changed files with 85 additions and 95 deletions
|
@ -238,12 +238,12 @@ impl Request {
|
|||
}
|
||||
|
||||
// Step 21
|
||||
if request.cache_mode == NetTraitsRequestCache::OnlyIfCached {
|
||||
if request.mode != NetTraitsRequestMode::SameOrigin {
|
||||
return Err(Error::Type(
|
||||
"Cache is 'only-if-cached' and mode is not 'same-origin'".to_string(),
|
||||
));
|
||||
}
|
||||
if request.cache_mode == NetTraitsRequestCache::OnlyIfCached &&
|
||||
request.mode != NetTraitsRequestMode::SameOrigin
|
||||
{
|
||||
return Err(Error::Type(
|
||||
"Cache is 'only-if-cached' and mode is not 'same-origin'".to_string(),
|
||||
));
|
||||
}
|
||||
|
||||
// Step 22
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue