Skip to content

Commit 1546b35

Browse files
committed
cleanup
1 parent 58b66ef commit 1546b35

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

crates/next-core/src/segment_config.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -898,12 +898,10 @@ async fn parse_static_string_or_array_from_js_value(
898898
// will error.
899899
JsValue::Array { items, .. } => {
900900
let mut result = Vec::new();
901-
let mut invalid = false;
902901
for (i, item) in items.iter().enumerate() {
903902
if let Some(str) = item.as_str() {
904903
result.push(str.to_string().into());
905904
} else {
906-
invalid = true;
907905
invalid_config(
908906
source,
909907
key,
@@ -919,7 +917,7 @@ async fn parse_static_string_or_array_from_js_value(
919917
.await?;
920918
}
921919
}
922-
if invalid { None } else { Some(result) }
920+
Some(result)
923921
}
924922
_ => {
925923
invalid_config(

0 commit comments

Comments
 (0)