-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathtypes.rs
More file actions
29 lines (22 loc) · 573 Bytes
/
Copy pathtypes.rs
File metadata and controls
29 lines (22 loc) · 573 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use linkify::Link;
use linkify::LinkFinder;
use linkify::LinkKind;
#[test]
fn send_and_sync() {
check_send::<LinkFinder>();
check_sync::<LinkFinder>();
check_send::<Link<'_>>();
check_sync::<Link<'_>>();
}
#[test]
fn equality() {
let finder = LinkFinder::new();
let first = finder.links("http://example.org").next();
assert!(first.is_some());
let link = first.unwrap();
// Check that link has Debug
println!("{:?}", link);
assert_eq!(link.kind(), &LinkKind::Url);
}
fn check_send<T: Send>() {}
fn check_sync<T: Sync>() {}