Skip to content

Commit 618d60e

Browse files
committed
try sorting
1 parent de4150e commit 618d60e

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/docbuilder/rustwide_builder.rs

+14-5
Original file line numberDiff line numberDiff line change
@@ -794,15 +794,24 @@ mod tests {
794794

795795
assert_eq!(row.get::<_, bool>("rustdoc_status"), true);
796796
assert_eq!(row.get::<_, String>("default_target"), default_target);
797+
798+
let mut targets: Vec<String> = row
799+
.get::<_, Value>("doc_targets")
800+
.as_array()
801+
.unwrap()
802+
.into_iter()
803+
.map(|v| v.as_str().unwrap().clone().to_owned())
804+
.collect();
805+
targets.sort();
797806
assert_eq!(
798-
row.get::<_, Value>("doc_targets"),
799-
json!([
800-
"x86_64-unknown-linux-gnu", // default target is first
801-
"i686-pc-windows-msvc", // rest is alphabetically
807+
targets,
808+
vec![
809+
"i686-pc-windows-msvc",
802810
"i686-unknown-linux-gnu",
803811
"x86_64-apple-darwin",
804812
"x86_64-pc-windows-msvc",
805-
])
813+
"x86_64-unknown-linux-gnu",
814+
]
806815
);
807816

808817
let storage = env.storage();

0 commit comments

Comments
 (0)