Fixing tests and review comments

This commit is contained in:
Tomasz Drwięga
2016-08-31 13:24:06 +02:00
parent 8f13b550d8
commit 99acd4914e
6 changed files with 29 additions and 18 deletions

View File

@@ -1,12 +1,15 @@
extern crate https_fetch;
use std::io;
use std::sync::Arc;
use std::sync::atomic::AtomicBool;
use https_fetch::*;
fn main() {
let client = Client::new().unwrap();
let aborted = Arc::new(AtomicBool::new(false));
client.fetch(Url::new("github.com", 443, "/").unwrap(), Box::new(io::stdout()), |result| {
client.fetch(Url::new("github.com", 443, "/").unwrap(), Box::new(io::stdout()), aborted, |result| {
assert!(result.is_ok());
}).unwrap();
}