summaryrefslogtreecommitdiffstats
path: root/toolkit/components/bitsdownload
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /toolkit/components/bitsdownload
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/bitsdownload')
-rw-r--r--toolkit/components/bitsdownload/bits_client/bits/src/wide.rs22
-rw-r--r--toolkit/components/bitsdownload/src/bits_interface/action.rs1
-rw-r--r--toolkit/components/bitsdownload/src/bits_interface/error.rs1
3 files changed, 2 insertions, 22 deletions
diff --git a/toolkit/components/bitsdownload/bits_client/bits/src/wide.rs b/toolkit/components/bitsdownload/bits_client/bits/src/wide.rs
index c108f8d629..b4f3157801 100644
--- a/toolkit/components/bitsdownload/bits_client/bits/src/wide.rs
+++ b/toolkit/components/bitsdownload/bits_client/bits/src/wide.rs
@@ -6,9 +6,8 @@
// Minimal null-terminated wide string support from wio.
-use std::ffi::{OsStr, OsString};
-use std::os::windows::ffi::{OsStrExt, OsStringExt};
-use std::slice;
+use std::ffi::OsStr;
+use std::os::windows::ffi::OsStrExt;
pub trait ToWideNull {
fn to_wide_null(&self) -> Vec<u16>;
@@ -19,20 +18,3 @@ impl<T: AsRef<OsStr>> ToWideNull for T {
self.as_ref().encode_wide().chain(Some(0)).collect()
}
}
-
-pub trait FromWidePtrNull {
- unsafe fn from_wide_ptr_null(wide: *const u16) -> Self;
-}
-
-impl FromWidePtrNull for OsString {
- unsafe fn from_wide_ptr_null(wide: *const u16) -> Self {
- assert!(!wide.is_null());
-
- for i in 0.. {
- if *wide.offset(i) == 0 {
- return Self::from_wide(&slice::from_raw_parts(wide, i as usize));
- }
- }
- unreachable!()
- }
-}
diff --git a/toolkit/components/bitsdownload/src/bits_interface/action.rs b/toolkit/components/bitsdownload/src/bits_interface/action.rs
index 1019e29827..c73d916a07 100644
--- a/toolkit/components/bitsdownload/src/bits_interface/action.rs
+++ b/toolkit/components/bitsdownload/src/bits_interface/action.rs
@@ -11,7 +11,6 @@
//! A value of type `ServiceAction` or `RequestAction` can easily be converted
//! to an `Action` using the `into()` method.
-use std::convert::From;
use xpcom::interfaces::nsIBits;
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
diff --git a/toolkit/components/bitsdownload/src/bits_interface/error.rs b/toolkit/components/bitsdownload/src/bits_interface/error.rs
index c046ae5e70..bed6975f9d 100644
--- a/toolkit/components/bitsdownload/src/bits_interface/error.rs
+++ b/toolkit/components/bitsdownload/src/bits_interface/error.rs
@@ -13,7 +13,6 @@ use bits_client::{
use comedy::error::HResult as ComedyError;
use nserror::{nsresult, NS_ERROR_FAILURE};
use nsstring::nsCString;
-use std::convert::From;
use xpcom::interfaces::nsIBits;
#[derive(Debug, PartialEq, Clone, Copy)]