Skip to content

Commit a441807

Browse files
committed
fix: apply rustfmt formatting
1 parent c1e69dd commit a441807

4 files changed

Lines changed: 7 additions & 14 deletions

File tree

src/cortex-app-server/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub struct ServerConfig {
8686

8787
fn default_shutdown_timeout() -> u64 {
8888
30 // 30 seconds for graceful shutdown
89-
// See cortex_common::http_client for timeout hierarchy documentation
89+
// See cortex_common::http_client for timeout hierarchy documentation
9090
}
9191

9292
fn default_listen_addr() -> String {

src/cortex-common/src/config_substitution.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ use thiserror::Error;
1515
/// Group 1: variable name
1616
/// Group 2: optional default value (after second colon)
1717
static ENV_REGEX: LazyLock<Regex> = LazyLock::new(|| {
18-
Regex::new(r"\{env:([^:}]+)(?::([^}]*))?\}")
19-
.expect("env regex pattern is valid and tested")
18+
Regex::new(r"\{env:([^:}]+)(?::([^}]*))?\}").expect("env regex pattern is valid and tested")
2019
});
2120

2221
/// Static regex for file content substitution: {file:path}

src/cortex-tui/src/runner/event_loop/streaming.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,8 @@ impl EventLoop {
183183
};
184184

185185
// Start the completion request with timeout
186-
let stream_result = tokio::time::timeout(
187-
STREAMING_CONNECTION_TIMEOUT,
188-
client.complete(request),
189-
)
190-
.await;
186+
let stream_result =
187+
tokio::time::timeout(STREAMING_CONNECTION_TIMEOUT, client.complete(request)).await;
191188

192189
let mut stream = match stream_result {
193190
Ok(Ok(s)) => s,
@@ -222,11 +219,7 @@ impl EventLoop {
222219
}
223220

224221
// Wait for next event with timeout
225-
let event = tokio::time::timeout(
226-
STREAMING_CHUNK_TIMEOUT,
227-
stream.next(),
228-
)
229-
.await;
222+
let event = tokio::time::timeout(STREAMING_CHUNK_TIMEOUT, stream.next()).await;
230223

231224
match event {
232225
Ok(Some(Ok(ResponseEvent::Delta(delta)))) => {

src/cortex-tui/src/runner/event_loop/subagent.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ impl EventLoop {
218218
};
219219

220220
let stream_result =
221-
tokio::time::timeout(SUBAGENT_CONNECTION_TIMEOUT, client.complete(request)).await;
221+
tokio::time::timeout(SUBAGENT_CONNECTION_TIMEOUT, client.complete(request))
222+
.await;
222223

223224
let mut stream = match stream_result {
224225
Ok(Ok(s)) => s,

0 commit comments

Comments
 (0)