tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 48674032965d7a3300a33cd501f22d99e656a940
parent cbd0a09437ba55ffd2f7c886b819f5a7427050bb
Author: Mike Hommey <mh+mozilla@glandium.org>
Date:   Thu, 23 Oct 2025 07:23:53 +0000

Bug 1995482 - Fix mismatched-lifetime-syntaxes warning in crashreporter. r=gsvelto

Differential Revision: https://phabricator.services.mozilla.com/D269346

Diffstat:
Mtoolkit/crashreporter/client/app/src/config.rs | 2+-
Mtoolkit/crashreporter/client/app/src/data.rs | 2+-
Mtoolkit/crashreporter/client/app/src/net/libcurl.rs | 2+-
Mtoolkit/crashreporter/client/app/src/ui/windows/mod.rs | 6+++---
Mtoolkit/crashreporter/minidump-analyzer/src/windows/wintrust.rs | 2+-
5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/toolkit/crashreporter/client/app/src/config.rs b/toolkit/crashreporter/client/app/src/config.rs @@ -319,7 +319,7 @@ impl Config { /// The id of the local dump file (the base filename without extension). /// /// Panics if no dump file is set. - pub fn local_dump_id(&self) -> Cow<str> { + pub fn local_dump_id(&self) -> Cow<'_, str> { self.dump_file().file_stem().unwrap().to_string_lossy() } diff --git a/toolkit/crashreporter/client/app/src/data.rs b/toolkit/crashreporter/client/app/src/data.rs @@ -104,7 +104,7 @@ impl<T> Synchronized<T> { } /// Borrow a value's data. - pub fn borrow(&self) -> std::cell::Ref<T> { + pub fn borrow(&self) -> std::cell::Ref<'_, T> { self.inner.current.borrow() } diff --git a/toolkit/crashreporter/client/app/src/net/libcurl.rs b/toolkit/crashreporter/client/app/src/net/libcurl.rs @@ -199,7 +199,7 @@ fn to_result(code: CurlCode) -> Result<()> { } impl Curl { - pub fn easy(&self) -> std::io::Result<Easy> { + pub fn easy(&self) -> std::io::Result<Easy<'_>> { let handle = unsafe { (self.curl_easy_init)() }; if handle.0.is_null() { Err(std::io::Error::other("curl_easy_init failed")) diff --git a/toolkit/crashreporter/client/app/src/ui/windows/mod.rs b/toolkit/crashreporter/client/app/src/ui/windows/mod.rs @@ -507,7 +507,7 @@ impl WindowRenderer { } } - pub fn child_renderer(&self, window: HWND) -> WindowChildRenderer { + pub fn child_renderer(&self, window: HWND) -> WindowChildRenderer<'_> { WindowChildRenderer { renderer: &self.inner, window, @@ -557,7 +557,7 @@ struct WindowChildRenderer<'a> { } impl<'a> WindowChildRenderer<'a> { - fn add_child<W: window::WindowClass>(&mut self, class: W) -> WindowBuilder<W> { + fn add_child<W: window::WindowClass>(&mut self, class: W) -> WindowBuilder<'_, W> { let builder = class .builder(self.renderer.module) .style(win::WS_CHILD | win::WS_VISIBLE) @@ -567,7 +567,7 @@ impl<'a> WindowChildRenderer<'a> { builder } - fn add_window<W: window::WindowClass>(&mut self, class: W) -> WindowBuilder<W> { + fn add_window<W: window::WindowClass>(&mut self, class: W) -> WindowBuilder<'_, W> { class .builder(self.renderer.module) .style(win::WS_OVERLAPPEDWINDOW) diff --git a/toolkit/crashreporter/minidump-analyzer/src/windows/wintrust.rs b/toolkit/crashreporter/minidump-analyzer/src/windows/wintrust.rs @@ -91,7 +91,7 @@ impl CATAdmin { } /// Find the first catalog that contains the given hash. - pub fn catalog_from_hash(&self, hash: &mut [u8]) -> Option<CATInfo> { + pub fn catalog_from_hash(&self, hash: &mut [u8]) -> Option<CATInfo<'_>> { let ptr = unsafe { CryptCATAdminEnumCatalogFromHash( self.0,