mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update to rust 1.85 (#35628)
* Update to rust 1.85 This is needed for cargo-deny Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Upgrade crown Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Clippy fixes Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Re-upgrade cargo-deny to 0.18 Keeping it locked to 0.18 just in case they update their required rustc version again Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
d78f7b2d78
commit
be6765447d
36 changed files with 88 additions and 105 deletions
|
@ -183,7 +183,7 @@ impl ServoCookie {
|
|||
let has_case_insensitive_prefix = |value: &str, prefix: &str| {
|
||||
value
|
||||
.get(..prefix.len())
|
||||
.map_or(false, |p| p.eq_ignore_ascii_case(prefix))
|
||||
.is_some_and(|p| p.eq_ignore_ascii_case(prefix))
|
||||
};
|
||||
if has_case_insensitive_prefix(cookie.name(), "__Secure-") &&
|
||||
!cookie.secure().unwrap_or(false)
|
||||
|
|
|
@ -261,9 +261,7 @@ fn get_oldest_accessed(
|
|||
if (c.cookie.secure().unwrap_or(false) == is_secure_cookie) &&
|
||||
oldest_accessed
|
||||
.as_ref()
|
||||
.map_or(true, |(_, current_oldest_time)| {
|
||||
c.last_access < *current_oldest_time
|
||||
})
|
||||
.is_none_or(|(_, current_oldest_time)| c.last_access < *current_oldest_time)
|
||||
{
|
||||
oldest_accessed = Some((i, c.last_access));
|
||||
}
|
||||
|
|
|
@ -275,14 +275,12 @@ impl Stream for BodyStream {
|
|||
//
|
||||
// The error can be safely ignored if we known that all content was received or is explicitly
|
||||
// set in preferences.
|
||||
let all_content_read = self
|
||||
.content_length
|
||||
.map_or(false, |c| c.0 == self.total_read);
|
||||
let all_content_read = self.content_length.is_some_and(|c| c.0 == self.total_read);
|
||||
if self.is_secure_scheme && all_content_read {
|
||||
let source = err.source();
|
||||
let is_unexpected_eof = source
|
||||
.and_then(|e| e.downcast_ref::<io::Error>())
|
||||
.map_or(false, |e| e.kind() == io::ErrorKind::UnexpectedEof);
|
||||
.is_some_and(|e| e.kind() == io::ErrorKind::UnexpectedEof);
|
||||
if is_unexpected_eof {
|
||||
return Poll::Ready(None);
|
||||
}
|
||||
|
|
|
@ -392,9 +392,9 @@ impl Mp4Matcher {
|
|||
return false;
|
||||
}
|
||||
|
||||
let box_size = ((data[0] as u32) << 24 |
|
||||
(data[1] as u32) << 16 |
|
||||
(data[2] as u32) << 8 |
|
||||
let box_size = (((data[0] as u32) << 24) |
|
||||
((data[1] as u32) << 16) |
|
||||
((data[2] as u32) << 8) |
|
||||
(data[3] as u32)) as usize;
|
||||
if (data.len() < box_size) || (box_size % 4 != 0) {
|
||||
return false;
|
||||
|
|
|
@ -185,11 +185,11 @@ impl StorageManager {
|
|||
let message = data
|
||||
.get_mut(&origin)
|
||||
.map(|&mut (ref mut total, ref mut entry)| {
|
||||
let mut new_total_size = this_storage_size + value.as_bytes().len();
|
||||
let mut new_total_size = this_storage_size + value.len();
|
||||
if let Some(old_value) = entry.get(&name) {
|
||||
new_total_size -= old_value.as_bytes().len();
|
||||
new_total_size -= old_value.len();
|
||||
} else {
|
||||
new_total_size += name.as_bytes().len();
|
||||
new_total_size += name.len();
|
||||
}
|
||||
|
||||
if (new_total_size + other_storage_size) > QUOTA_SIZE_LIMIT {
|
||||
|
@ -245,7 +245,7 @@ impl StorageManager {
|
|||
.get_mut(&origin)
|
||||
.and_then(|&mut (ref mut total, ref mut entry)| {
|
||||
entry.remove(&name).inspect(|old| {
|
||||
*total -= name.as_bytes().len() + old.as_bytes().len();
|
||||
*total -= name.len() + old.len();
|
||||
})
|
||||
});
|
||||
sender.send(old_value).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue