Run cargo fmt on PR #193 code to satisfy the fmt hook

The squashed thinking-notice PR was committed with --no-verify, so three
files were never run through `cargo fmt` under the project's pinned
toolchain (rust-toolchain.toml = 1.96.0). Format them so `cargo fmt
--all -- --check` passes — a prerequisite for wiring the prek suite
(which includes that check) into CI in the next commit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-06-26 07:20:20 +03:00
parent 318a8fd91d
commit 355b1b299c
3 changed files with 21 additions and 6 deletions

View File

@@ -2,7 +2,8 @@ use mxlink::matrix_sdk::{
Room,
room::edit::EditedContent,
ruma::{
EventId, OwnedEventId, api::client::receipt::create_receipt::v3::ReceiptType,
EventId, OwnedEventId,
api::client::receipt::create_receipt::v3::ReceiptType,
events::room::message::{
OriginalSyncRoomMessageEvent, RoomMessageEventContentWithoutRelation,
},

View File

@@ -558,7 +558,9 @@ async fn handle_stage_text_generation(
// loop exits the instant generation resolves, so there is no detached task and no late edit can
// ever clobber the real answer. `placeholder` is the event we must finalize in every exit path.
let (result, placeholder) = if let Some(notice_prompt_variables) = notice_prompt_variables {
let generation = controller.generate_text(conversation, params).instrument(span);
let generation = controller
.generate_text(conversation, params)
.instrument(span);
tokio::pin!(generation);
let mut placeholder: Option<OwnedEventId> = None;

View File

@@ -84,11 +84,23 @@ mod tests {
// Boundaries: light below 30s, medium [30s, 90s), deep at/after 90s.
// The pools have distinct content, so value comparison identifies the tier.
assert_eq!(messages_for_elapsed(Duration::from_secs(0)), MESSAGES_LIGHT);
assert_eq!(messages_for_elapsed(Duration::from_secs(29)), MESSAGES_LIGHT);
assert_eq!(messages_for_elapsed(Duration::from_secs(30)), MESSAGES_MEDIUM);
assert_eq!(messages_for_elapsed(Duration::from_secs(89)), MESSAGES_MEDIUM);
assert_eq!(
messages_for_elapsed(Duration::from_secs(29)),
MESSAGES_LIGHT
);
assert_eq!(
messages_for_elapsed(Duration::from_secs(30)),
MESSAGES_MEDIUM
);
assert_eq!(
messages_for_elapsed(Duration::from_secs(89)),
MESSAGES_MEDIUM
);
assert_eq!(messages_for_elapsed(Duration::from_secs(90)), MESSAGES_DEEP);
assert_eq!(messages_for_elapsed(Duration::from_secs(600)), MESSAGES_DEEP);
assert_eq!(
messages_for_elapsed(Duration::from_secs(600)),
MESSAGES_DEEP
);
}
#[test]