Skip to content

Commit 4747501

Browse files
committed
chore: fix clippy suggestions
1 parent d68436b commit 4747501

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

llm/bedrock/src/client.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ impl WasiSleep {
177177
}
178178

179179
impl AsyncSleep for WasiSleep {
180+
#[allow(clippy::missing_transmute_annotations)]
180181
fn sleep(&self, duration: std::time::Duration) -> Sleep {
181182
let reactor = self.reactor.clone();
182183

llm/bedrock/src/conversions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ fn get_bytes_from_url(url: &str) -> Result<Vec<u8>, llm::Error> {
233233
let client = reqwest::Client::builder(reactor)
234234
.build()
235235
.expect("Failed to initialize HTTP client");
236-
236+
237237
let response = client.get(url).send().await.map_err(|err| {
238238
custom_error(
239239
llm::ErrorCode::InvalidRequest,
@@ -249,14 +249,14 @@ fn get_bytes_from_url(url: &str) -> Result<Vec<u8>, llm::Error> {
249249
),
250250
));
251251
}
252-
252+
253253
let bytes = response.bytes().await.map_err(|err| {
254254
custom_error(
255255
llm::ErrorCode::InvalidRequest,
256256
format!("Could not read image bytes from url: {url}, cause: {err}"),
257257
)
258258
})?;
259-
259+
260260
Ok(bytes.to_vec())
261261

262262
})

llm/bedrock/src/wasi_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl HttpConnector for SharedWasiConnector {
122122
let mut headers = Headers::new();
123123
for header in headers_map {
124124
if let Some(key) = header.0 {
125-
if let Some(value) = header.1.to_str().ok() {
125+
if let Ok(value) = header.1.to_str() {
126126
headers.insert(key.to_string(), value.to_string());
127127
}
128128
}

0 commit comments

Comments
 (0)