Skip to content

Commit f46590d

Browse files
committed
fix: decouple emulation browser and OS randomness
1 parent 71e1852 commit f46590d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/client.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,9 @@ pub fn build_client() -> WreqClient {
7171
];
7272
let emulation_os = [EmulationOS::Android, EmulationOS::Windows, EmulationOS::Linux];
7373

74-
let rand = fastrand::usize(..);
7574
let emulation = EmulationOption::builder()
76-
.emulation(emulations[rand % emulations.len()])
77-
.emulation_os(emulation_os[rand % emulation_os.len()])
75+
.emulation(*fastrand::choice(emulations.iter()).unwrap())
76+
.emulation_os(*fastrand::choice(emulation_os.iter()).unwrap())
7877
.build()
7978
.emulation();
8079

0 commit comments

Comments
 (0)