Dependency updates and Doc improvements

This commit is contained in:
2025-08-13 17:42:04 +02:00
parent e401d5f1ac
commit 226a7494a0
7 changed files with 97 additions and 75 deletions

View File

@@ -260,21 +260,21 @@ impl<
/// * `cfg` - The local entity configuration for this source handler.
/// * `pdu_sender` - [PduSendProvider] provider used to send CFDP PDUs generated by the handler.
/// * `vfs` - [VirtualFilestore] implementation used by the handler, which decouples the CFDP
/// implementation from the underlying filestore/filesystem. This allows to use this handler
/// for embedded systems where a standard runtime might not be available.
/// implementation from the underlying filestore/filesystem. This allows to use this handler
/// for embedded systems where a standard runtime might not be available.
/// * `put_request_cacher` - The put request cacher is used cache put requests without
/// requiring run-time allocation.
/// requiring run-time allocation.
/// * `pdu_and_cksum_buf_size` - The handler requires a buffer to generate PDUs and perform
/// checksum calculations. The user can specify the size of this buffer, so this should be
/// set to the maximum expected PDU size or a conservative upper bound for this size, for
/// example 2048 or 4096 bytes.
/// checksum calculations. The user can specify the size of this buffer, so this should be
/// set to the maximum expected PDU size or a conservative upper bound for this size, for
/// example 2048 or 4096 bytes.
/// * `remote_cfg_table` - The [RemoteEntityConfigProvider] used to look up remote
/// entities and target specific configuration for file copy operations.
/// entities and target specific configuration for file copy operations.
/// * `timer_creator` - [TimerCreatorProvider] used by the CFDP handler to generate
/// timers required by various tasks. This allows to use this handler for embedded systems
/// where the standard time APIs might not be available.
/// timers required by various tasks. This allows to use this handler for embedded systems
/// where the standard time APIs might not be available.
/// * `seq_count_provider` - The [SequenceCountProvider] used to generate the [TransactionId]
/// which contains an incrementing counter.
/// which contains an incrementing counter.
#[allow(clippy::too_many_arguments)]
pub fn new(
cfg: LocalEntityConfig<UserFaultHook>,
@@ -386,7 +386,7 @@ impl<
/// This function is used to pass a put request to the source handler, which is
/// also used to start a file copy operation. As such, this function models the Put.request
/// CFDP primtiive.
///
/// Please note that the source handler can also process one put request at a time.
/// The caller is responsible of creating a new source handler, one handler can only handle
/// one file copy request at a time.
@@ -505,7 +505,8 @@ impl<
}
if let Some(active_id) = self.transaction_id() {
if active_id == *transaction_id {
self.notice_of_cancellation(user, ConditionCode::CancelRequestReceived)?;
// Control flow result can be ignored here for the cancel request.
let _ = self.notice_of_cancellation(user, ConditionCode::CancelRequestReceived)?;
return Ok(true);
}
}
@@ -1533,7 +1534,7 @@ mod tests {
.open(&tb.srcfile)
.expect("opening file failed");
let mut rand_data = [0u8; 140];
rand::thread_rng().fill(&mut rand_data[..]);
rand::rng().fill(&mut rand_data[..]);
file.write_all(&rand_data)
.expect("writing file content failed");
drop(file);
@@ -1552,7 +1553,7 @@ mod tests {
.open(&tb.srcfile)
.expect("opening file failed");
let mut rand_data = [0u8; 140];
rand::thread_rng().fill(&mut rand_data[..]);
rand::rng().fill(&mut rand_data[..]);
file.write_all(&rand_data)
.expect("writing file content failed");
drop(file);
@@ -1748,7 +1749,7 @@ mod tests {
.open(&tb.srcfile)
.expect("opening file failed");
let mut rand_data = [0u8; 140];
rand::thread_rng().fill(&mut rand_data[..]);
rand::rng().fill(&mut rand_data[..]);
file.write_all(&rand_data)
.expect("writing file content failed");
drop(file);