Bump the toolchain to nightly-2025-09-24

This commit is contained in:
Jordan Rose
2025-09-29 12:22:31 -07:00
committed by GitHub
parent 90c66511dc
commit e516d8e227
14 changed files with 22 additions and 38 deletions

View File

@@ -1 +1 @@
nightly-2025-02-25
nightly-2025-09-24

View File

@@ -37,7 +37,12 @@ pub unsafe extern "C" fn signal_free_buffer(buf: *const c_uchar, buf_len: usize)
if buf.is_null() {
return;
}
drop(unsafe { Box::from_raw(std::slice::from_raw_parts_mut(buf as *mut c_uchar, buf_len)) });
drop(unsafe {
Box::from_raw(std::ptr::slice_from_raw_parts_mut(
buf as *mut c_uchar,
buf_len,
))
});
}
#[unsafe(no_mangle)]

View File

@@ -9,6 +9,7 @@ version = "0.1.0"
authors.workspace = true
license.workspace = true
edition = "2024"
rust-version.workspace = true
[lints]
workspace = true

View File

@@ -94,7 +94,7 @@ impl<T> OwnedBufferOf<T> {
return Box::new([]);
}
unsafe { Box::from_raw(std::slice::from_raw_parts_mut(base, length)) }
unsafe { Box::from_raw(std::ptr::slice_from_raw_parts_mut(base, length)) }
}
}

View File

@@ -70,6 +70,9 @@ bridge_as_handle!(AuthenticatedChatConnection);
impl UnwindSafe for AuthenticatedChatConnection {}
impl RefUnwindSafe for AuthenticatedChatConnection {}
// We could Box the PendingChatConnection, but in practice this type will be on the heap anyway, and
// there won't be a ton of them allocated.
#[expect(clippy::large_enum_variant)]
enum MaybeChatConnection {
Running(ChatConnection),
WaitingForListener(

View File

@@ -9,6 +9,7 @@ version = "0.1.0"
authors.workspace = true
license.workspace = true
edition = "2024"
rust-version = "1.85"
[lints]
workspace = true

View File

@@ -370,7 +370,6 @@ pub enum ChatItemMessage<M: Method + ReferencedTypes> {
DirectStoryReply(DirectStoryReplyMessage<M::RecipientReference>),
}
#[expect(dead_code)]
const CHAT_ITEM_MESSAGE_SIZE_LIMIT: usize = 200;
static_assertions::const_assert!(
std::mem::size_of::<StandardMessage<RecipientId>>() < CHAT_ITEM_MESSAGE_SIZE_LIMIT

View File

@@ -3,6 +3,8 @@
// SPDX-License-Identifier: AGPL-3.0-only
//
#![allow(dead_code)]
//! Key derivation from arguments, also shared with the examples.
//!
//! These *don't* live in the main library because they depend on clap.

View File

@@ -276,6 +276,7 @@ fn check_response_status(response: chat::Response) -> Result<chat::Response, Res
}
/// Like [`TryIntoResponse`], but without checking the status code first.
#[expect(clippy::result_large_err)]
fn parse_json_from_body<R>(response: &chat::Response) -> Result<R, ResponseError>
where
R: for<'a> serde::Deserialize<'a>,

View File

@@ -868,7 +868,7 @@ mod test {
fn write_frame_piece_by_piece() {
// Leave only enough space for the payload to assert that the header
// bytes were pulled out.
let (mut read, write) = tokio::io::simplex(Header::LEN);
let (read, write) = tokio::io::simplex(Header::LEN);
let mut read = pin!(read);
let mut direct = DirectStream::new(write);
@@ -921,7 +921,7 @@ mod test {
#[test_log::test]
fn writes_whole_frame_if_possible() {
const PAYLOAD: &[u8] = b"abcde";
let (mut read, write) = tokio::io::simplex(Header::LEN + PAYLOAD.len());
let (read, write) = tokio::io::simplex(Header::LEN + PAYLOAD.len());
let mut read = pin!(read);
let mut direct = DirectStream::new(write);
@@ -947,7 +947,7 @@ mod test {
#[test_log::test]
fn writes_multiple_frames_before_close() {
let (mut read, write) = tokio::io::simplex(60);
let (read, write) = tokio::io::simplex(60);
let mut read = pin!(read);
let mut direct = DirectStream::new(write);
@@ -992,7 +992,7 @@ mod test {
const PAYLOAD: &[u8] = b"abcde";
// The simplex's buffer is small enough that the entire frame won't fit
// at once.
let (mut read, write) = tokio::io::simplex(Header::LEN);
let (read, write) = tokio::io::simplex(Header::LEN);
let mut read = pin!(read);
let mut direct = DirectStream::new(write);

View File

@@ -213,20 +213,6 @@ mod test {
use crate::route::testutils::FakeContext;
use crate::route::{DirectTcpRouteProvider, TlsRouteProvider};
#[derive(Copy, Clone, Debug, Default)]
struct FakeProvider;
impl RouteProvider for FakeProvider {
type Route = ();
fn routes<'s>(
&'s self,
_context: &impl RouteProviderContext,
) -> impl Iterator<Item = Self::Route> + 's {
std::iter::once(())
}
}
#[test]
fn http_provider_route_order() {
const DIRECT_TCP_PORT: NonZeroU16 = nonzero!(1234u16);

View File

@@ -25,6 +25,7 @@ pub struct NoiseDirectConnectShadow<'a> {
}
#[derive(Debug, derive_more::From, displaydoc::Display)]
#[expect(dead_code)]
enum Error {
/// IO: {0}
Io(#[from] std::io::ErrorKind),

View File

@@ -90,6 +90,7 @@ trait Parameters {
const PUBLIC_KEY_LENGTH: usize;
const SECRET_KEY_LENGTH: usize;
const CIPHERTEXT_LENGTH: usize;
#[cfg_attr(not(test), expect(dead_code))]
const SHARED_SECRET_LENGTH: usize;
fn generate<R: CryptoRng + ?Sized>(
csprng: &mut R,

View File

@@ -1966,9 +1966,7 @@ SignalFfiError *signal_message_new(SignalMutPointerSignalMessage *out, uint8_t m
SignalFfiError *signal_message_verify_mac(bool *out, SignalConstPointerSignalMessage msg, SignalConstPointerPublicKey sender_identity_key, SignalConstPointerPublicKey receiver_identity_key, SignalBorrowedBuffer mac_key);
#if defined(SIGNAL_MEDIA_SUPPORTED)
SignalFfiError *signal_mp4_sanitizer_sanitize(SignalMutPointerSanitizedMetadata *out, SignalConstPointerFfiInputStreamStruct input, uint64_t len);
#endif
SignalFfiError *signal_online_backup_validator_add_frame(SignalMutPointerOnlineBackupValidator backup, SignalBorrowedBuffer frame);
@@ -2242,25 +2240,15 @@ SignalFfiError *signal_registration_session_get_requested_information(SignalOwne
SignalFfiError *signal_registration_session_get_verified(bool *out, SignalConstPointerRegistrationSession session);
#if defined(SIGNAL_MEDIA_SUPPORTED)
SignalFfiError *signal_sanitized_metadata_clone(SignalMutPointerSanitizedMetadata *new_obj, SignalConstPointerSanitizedMetadata obj);
#endif
#if defined(SIGNAL_MEDIA_SUPPORTED)
SignalFfiError *signal_sanitized_metadata_destroy(SignalMutPointerSanitizedMetadata p);
#endif
#if defined(SIGNAL_MEDIA_SUPPORTED)
SignalFfiError *signal_sanitized_metadata_get_data_len(uint64_t *out, SignalConstPointerSanitizedMetadata sanitized);
#endif
#if defined(SIGNAL_MEDIA_SUPPORTED)
SignalFfiError *signal_sanitized_metadata_get_data_offset(uint64_t *out, SignalConstPointerSanitizedMetadata sanitized);
#endif
#if defined(SIGNAL_MEDIA_SUPPORTED)
SignalFfiError *signal_sanitized_metadata_get_metadata(SignalOwnedBuffer *out, SignalConstPointerSanitizedMetadata sanitized);
#endif
SignalFfiError *signal_sealed_sender_multi_recipient_encrypt(SignalOwnedBuffer *out, SignalBorrowedSliceOfConstPointerProtocolAddress recipients, SignalBorrowedSliceOfConstPointerSessionRecord recipient_sessions, SignalBorrowedBuffer excluded_recipients, SignalConstPointerUnidentifiedSenderMessageContent content, SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store);
@@ -2466,9 +2454,7 @@ SignalFfiError *signal_sgx_client_state_established_send(SignalOwnedBuffer *out,
SignalFfiError *signal_sgx_client_state_initial_request(SignalOwnedBuffer *out, SignalConstPointerSgxClientState obj);
#if defined(SIGNAL_MEDIA_SUPPORTED)
SignalFfiError *signal_signal_media_check_available(void);
#endif
SignalFfiError *signal_signed_pre_key_record_clone(SignalMutPointerSignedPreKeyRecord *new_obj, SignalConstPointerSignedPreKeyRecord obj);
@@ -2556,8 +2542,6 @@ SignalFfiError *signal_validating_mac_initialize(SignalMutPointerValidatingMac *
SignalFfiError *signal_validating_mac_update(int32_t *out, SignalMutPointerValidatingMac mac, SignalBorrowedBuffer bytes, uint32_t offset, uint32_t length);
#if defined(SIGNAL_MEDIA_SUPPORTED)
SignalFfiError *signal_webp_sanitizer_sanitize(SignalConstPointerFfiSyncInputStreamStruct input);
#endif
#endif /* SIGNAL_FFI_H_ */