Skip to content

Commit 13e8d78

Browse files
chore(runtime): tighten diff vs main and clean up API client builder
1 parent 868ac38 commit 13e8d78

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

lambda-runtime-api-client/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,7 @@ impl ClientBuilder {
116116
/// Create a new builder with a given base URI.
117117
/// Inherits all other attributes from the existent builder.
118118
pub fn with_endpoint(self, uri: http::Uri) -> Self {
119-
Self {
120-
uri: Some(uri),
121-
pool_size: self.pool_size,
122-
connector: self.connector,
123-
}
119+
Self { uri: Some(uri), ..self }
124120
}
125121

126122
/// Provide a pool size hint for the underlying Hyper client.

lambda-runtime/src/runtime.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::{
44
types::{invoke_request_id, IntoFunctionResponse, LambdaEvent},
55
Config, Context, Diagnostic,
66
};
7-
use futures::{stream::FuturesUnordered, StreamExt as FuturesStreamExt};
7+
use futures::stream::FuturesUnordered;
88
use http_body_util::BodyExt;
99
use lambda_runtime_api_client::{BoxError, Client as ApiClient};
1010
use serde::{Deserialize, Serialize};
@@ -15,7 +15,7 @@ use std::{
1515
sync::{Arc, OnceLock},
1616
};
1717
use tokio::sync::{watch, Semaphore};
18-
use tokio_stream::Stream;
18+
use tokio_stream::{Stream, StreamExt};
1919
use tower::{Layer, Service, ServiceExt};
2020
use tracing::{error, trace, warn};
2121

@@ -207,7 +207,7 @@ where
207207
}
208208
}
209209

210-
Some(result) = FuturesStreamExt::next(&mut polls) => {
210+
Some(result) = futures::StreamExt::next(&mut polls) => {
211211
let event = match result {
212212
Ok(event) => event,
213213
Err(e) => {
@@ -279,7 +279,7 @@ where
279279
}));
280280
}
281281

282-
Some(result) = FuturesStreamExt::next(&mut handlers) => {
282+
Some(result) = futures::StreamExt::next(&mut handlers) => {
283283
result??;
284284

285285
if paused_polls > 0 && handlers.len() < max_spawned_tasks && !shutting_down {

0 commit comments

Comments
 (0)