Skip to content

Commit 88d8a30

Browse files
committed
fix tests after rand upgrade
1 parent f197c25 commit 88d8a30

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/common.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use actix_files as fs;
22
use actix_web::{web, App, HttpRequest, HttpResponse, HttpServer, Responder};
33
use crossbeam_channel as cbc;
4-
use rand::RngCore;
54
use std::{io::Write, path::PathBuf, sync::Arc};
65
use urlencoding::decode;
76
use webbrowser::{open_browser, Browser};
@@ -108,7 +107,7 @@ where
108107
let cwd = std::env::current_dir().expect("unable to determine current dir");
109108
let tmpdir = cwd.join("target").join("tmp");
110109
let html_dir = html_dir.unwrap_or(tmpdir);
111-
let id = rand::thread_rng().next_u32();
110+
let id: u32 = rand::random();
112111
let pb = html_dir.join(format!("test.{id}.html"));
113112
let img_uri = format!("{URI_PNG_1PX}?r={id}");
114113
check_request_received_using(img_uri, "127.0.0.1", |uri, _port| {

0 commit comments

Comments
 (0)