Skip to content

Commit b133ad2

Browse files
committed
Fix clippy
1 parent 21a12c3 commit b133ad2

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

modules/sqlite/src/argument.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ impl<'js> FromJs<'js> for Argument<'js> {
2626
return Ok(Argument::Real(float));
2727
} else if let Some(string) = value.as_string() {
2828
return Ok(Argument::Text(CString::from_string(string.clone())?));
29-
} else if let Some(object) = value.as_object() {
30-
if object.as_typed_array::<u8>().is_some() {
31-
// Lifetime issue: https://github.com/DelSkayn/rquickjs/issues/356
32-
return Ok(Argument::Blob(CVec::from_array(
33-
TypedArray::<u8>::from_value(value.clone()).or_throw(ctx)?,
34-
)?));
35-
}
29+
} else if let Some(object) = value.as_object()
30+
&& object.as_typed_array::<u8>().is_some()
31+
{
32+
// Lifetime issue: https://github.com/DelSkayn/rquickjs/issues/356
33+
return Ok(Argument::Blob(CVec::from_array(
34+
TypedArray::<u8>::from_value(value.clone()).or_throw(ctx)?,
35+
)?));
3636
}
3737
Err(Exception::throw_type(
3838
ctx,

modules/url/src/url_search_params.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ impl URLSearchParams {
5757
let mut data = Vec::new();
5858
loop {
5959
let next = (This(iterable.clone()), 2).apply::<Object<'_>>(&next_fn)?;
60-
if let Ok(done) = next.get::<_, bool>(PredefinedAtom::Done) {
61-
if done {
62-
break;
63-
}
60+
if let Ok(done) = next.get::<_, bool>(PredefinedAtom::Done)
61+
&& done
62+
{
63+
break;
6464
}
6565
let value = next.get::<_, Array<'_>>("value")?;
6666
let name = value.get::<Coerced<String>>(0)?;

0 commit comments

Comments
 (0)