parent
6f30aa6e08
commit
2d8f8c98d3
|
@ -0,0 +1,58 @@
|
||||||
|
backported from
|
||||||
|
|
||||||
|
From 2efa106431e6fb15b73478f67e37cb307bac2be6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Simon Sapin <simon.sapin@exyr.org>
|
||||||
|
Date: Wed, 4 Jul 2018 22:18:36 +0200
|
||||||
|
Subject: [PATCH] Fix a lifetime bug uncovered by NLL, thanks @lqd
|
||||||
|
|
||||||
|
|
||||||
|
--- third_party/rust/url/src/lib.rs 2019-05-14 21:13:30.000000000 +0200
|
||||||
|
+++ third_party/rust/url/src/lib.rs 2019-05-14 21:13:30.000000000 +0200
|
||||||
|
@@ -1304,7 +1304,7 @@
|
||||||
|
self.serialization.push('?');
|
||||||
|
}
|
||||||
|
|
||||||
|
- let query = UrlQuery { url: self, fragment: fragment };
|
||||||
|
+ let query = UrlQuery { url: Some(self), fragment: fragment };
|
||||||
|
form_urlencoded::Serializer::for_suffix(query, query_start + "?".len())
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -2373,13 +2373,15 @@
|
||||||
|
/// Implementation detail of `Url::query_pairs_mut`. Typically not used directly.
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct UrlQuery<'a> {
|
||||||
|
- url: &'a mut Url,
|
||||||
|
+ url: Option<&'a mut Url>,
|
||||||
|
fragment: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> Drop for UrlQuery<'a> {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
- self.url.restore_already_parsed_fragment(self.fragment.take())
|
||||||
|
+ if let Some(url) = self.url.take() {
|
||||||
|
+ url.restore_already_parsed_fragment(self.fragment.take())
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--- third_party/rust/url/src/form_urlencoded.rs 2019-05-14 21:13:30.000000000 +0200
|
||||||
|
+++ third_party/rust/url/src/form_urlencoded.rs 2019-05-14 21:13:30.000000000 +0200
|
||||||
|
@@ -257,8 +257,16 @@
|
||||||
|
// * `Serializer` keeps its target in a private field
|
||||||
|
// * Unlike in other `Target` impls, `UrlQuery::finished` does not return `Self`.
|
||||||
|
impl<'a> Target for ::UrlQuery<'a> {
|
||||||
|
- fn as_mut_string(&mut self) -> &mut String { &mut self.url.serialization }
|
||||||
|
- fn finish(self) -> &'a mut ::Url { self.url }
|
||||||
|
+ fn as_mut_string(&mut self) -> &mut String {
|
||||||
|
+ &mut self.url.as_mut().unwrap().serialization
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ fn finish(mut self) -> &'a mut ::Url {
|
||||||
|
+ let url = self.url.take().unwrap();
|
||||||
|
+ url.restore_already_parsed_fragment(self.fragment.take());
|
||||||
|
+ url
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
type Finished = &'a mut ::Url;
|
||||||
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# Template file for 'icecat'
|
# Template file for 'icecat'
|
||||||
pkgname=icecat
|
pkgname=icecat
|
||||||
version=60.7.0
|
version=60.7.0
|
||||||
revision=3
|
revision=4
|
||||||
build_helper="rust"
|
build_helper="rust"
|
||||||
hostmakedepends="autoconf213 unzip zip pkg-config perl python yasm
|
hostmakedepends="autoconf213 unzip zip pkg-config perl python yasm
|
||||||
cargo llvm clang rust cbindgen"
|
cargo llvm clang rust cbindgen tar"
|
||||||
makedepends="gtk+-devel hunspell-devel libXt-devel libatomic-devel
|
makedepends="gtk+-devel hunspell-devel libXt-devel libatomic-devel
|
||||||
libevent-devel libnotify-devel libvpx5-devel nss-devel rust-std sqlite-devel
|
libevent-devel libnotify-devel libvpx5-devel nss-devel rust-std sqlite-devel
|
||||||
$(vopt_if alsa 'alsa-lib-devel') $(vopt_if dbus 'dbus-glib-devel')
|
$(vopt_if alsa 'alsa-lib-devel') $(vopt_if dbus 'dbus-glib-devel')
|
||||||
|
@ -19,7 +19,6 @@ homepage="https://www.gnu.org/software/${pkgname}/"
|
||||||
distfiles="${GNU_SITE}/${pkgname}/${version}/${pkgname}-${version}-gnu1.tar.bz2"
|
distfiles="${GNU_SITE}/${pkgname}/${version}/${pkgname}-${version}-gnu1.tar.bz2"
|
||||||
checksum=6873d55b13e2d95ede3bf5bb59769179e91b1c4e05d8538d1576f18c9a6bb827
|
checksum=6873d55b13e2d95ede3bf5bb59769179e91b1c4e05d8538d1576f18c9a6bb827
|
||||||
lib32disabled=yes
|
lib32disabled=yes
|
||||||
broken="Does not build with current rust"
|
|
||||||
|
|
||||||
build_options="alsa dbus gtk3 pulseaudio startup_notification sndio xscreensaver"
|
build_options="alsa dbus gtk3 pulseaudio startup_notification sndio xscreensaver"
|
||||||
build_options_default="alsa dbus gtk3 pulseaudio startup_notification sndio xscreensaver"
|
build_options_default="alsa dbus gtk3 pulseaudio startup_notification sndio xscreensaver"
|
||||||
|
@ -62,6 +61,7 @@ post_extract() {
|
||||||
|
|
||||||
post_patch() {
|
post_patch() {
|
||||||
_clear_vendor_checksums cssparser
|
_clear_vendor_checksums cssparser
|
||||||
|
_clear_vendor_checksums url
|
||||||
}
|
}
|
||||||
|
|
||||||
do_build() {
|
do_build() {
|
||||||
|
|
Loading…
Reference in New Issue