Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1dc187a

Browse files
committed
Fix tests to avoid scoped
1 parent364da3d commit1dc187a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎tests/test.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ fn test_basic() {
2020
let(s2, r2) = mpsc::channel();
2121

2222
let pool1 = pool.clone();
23-
let t1 = thread::scoped(move ||{
23+
let t1 = thread::spawn(move ||{
2424
let conn = pool1.get().unwrap();
2525
s1.send(()).unwrap();
2626
r2.recv().unwrap();
2727
drop(conn);
2828
});
2929

3030
let pool2 = pool.clone();
31-
let t2 = thread::scoped(move ||{
31+
let t2 = thread::spawn(move ||{
3232
let conn = pool2.get().unwrap();
3333
s2.send(()).unwrap();
3434
r1.recv().unwrap();
3535
drop(conn);
3636
});
3737

38-
t1.join();
39-
t2.join();
38+
t1.join().unwrap();
39+
t2.join().unwrap();
4040

4141
pool.get().unwrap();
4242
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp