thunderbird: update to 68.2.0.

This commit is contained in:
Helmut Pozimski 2019-10-25 10:07:48 +02:00
parent 6690af0669
commit cb7e4ecab9
2 changed files with 3 additions and 93 deletions

View file

@ -1,90 +0,0 @@
backport of:
From 3c98d22c5de3b696bf1fde2b6c90069812312aa6 Mon Sep 17 00:00:00 2001
From: Simon Sapin <simon.sapin@exyr.org>
Date: Tue, 23 Apr 2019 13:47:25 +0200
Subject: [PATCH] Fix a future-compat warning
```
warning[E0506]: cannot assign to `self.input.cached_token` because it is borrowed
--> src/parser.rs:591:17
|
566 | pub fn next_including_whitespace_and_comments(&mut self) -> Result<&Token<'i>, BasicParseError<'i>> {
| - let's call the lifetime of this reference `'1`
...
579 | Some(ref cached_token)
| ---------------- borrow of `self.input.cached_token` occurs here
...
591 | self.input.cached_token = Some(CachedToken {
| ^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `self.input.cached_token` occurs here
...
603 | Ok(token)
| --------- returning this value requires that `self.input.cached_token.0` is borrowed for `'1`
|
= warning: this error has been downgraded to a warning for backwards compatibility with previous releases
= warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
```
---
src/parser.rs | 50 +++++++++++++++++++++++++++-----------------------
1 file changed, 27 insertions(+), 23 deletions(-)
diff --git a/src/parser.rs b/src/parser.rs
index 51f441e4..7cef117c 100644
--- third_party/rust/cssparser/src/parser.rs
+++ third_party/rust/cssparser/src/parser.rs
@@ -555,28 +555,34 @@
}
let token_start_position = self.input.tokenizer.position();
- let token;
- match self.input.cached_token {
- Some(ref cached_token)
- if cached_token.start_position == token_start_position => {
- self.input.tokenizer.reset(&cached_token.end_state);
- match cached_token.token {
- Token::Function(ref name) => self.input.tokenizer.see_function(name),
- _ => {}
- }
- token = &cached_token.token
+ let using_cached_token = self
+ .input
+ .cached_token
+ .as_ref()
+ .map_or(false, |cached_token| {
+ cached_token.start_position == token_start_position
+ });
+ let token = if using_cached_token {
+ let cached_token = self.input.cached_token.as_ref().unwrap();
+ self.input.tokenizer.reset(&cached_token.end_state);
+ match cached_token.token {
+ Token::Function(ref name) => self.input.tokenizer.see_function(name),
+ _ => {}
}
- _ => {
- let new_token = self.input.tokenizer.next()
- .map_err(|()| self.new_basic_error(BasicParseErrorKind::EndOfInput))?;
- self.input.cached_token = Some(CachedToken {
- token: new_token,
- start_position: token_start_position,
- end_state: self.input.tokenizer.state(),
- });
- token = self.input.cached_token_ref()
- }
- }
+ &cached_token.token
+ } else {
+ let new_token = self
+ .input
+ .tokenizer
+ .next()
+ .map_err(|()| self.new_basic_error(BasicParseErrorKind::EndOfInput))?;
+ self.input.cached_token = Some(CachedToken {
+ token: new_token,
+ start_position: token_start_position,
+ end_state: self.input.tokenizer.state(),
+ });
+ self.input.cached_token_ref()
+ };
if let Some(block_type) = BlockType::opening(token) {
self.at_start_of = Some(block_type);

View file

@ -3,15 +3,15 @@
# THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/thunderbird-i18n".
#
pkgname=thunderbird
version=68.1.0
revision=2
version=68.2.0
revision=1
build_helper="rust"
short_desc="Standalone Mail/News reader"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later"
homepage="https://www.thunderbird.net/"
distfiles="${MOZILLA_SITE}/${pkgname}/releases/${version}/source/${pkgname}-${version}.source.tar.xz"
checksum=de0e5c7d1d5576f451e386e4779f155b7af97621a4e22caac0c6dee3c9d76eef
checksum=e9fa1d0ced64ffc32faab9a0fc8e03865c04e4d29bfd7a3f1bf5d25594ce0600
lib32disabled=yes