fix(transport): Update benchmark code
This commit is contained in:
@@ -19,7 +19,7 @@ fn bench_simple_send(b: &mut test::Bencher) {
|
|||||||
"id".to_string(),
|
"id".to_string(),
|
||||||
"Hello world".to_string(),
|
"Hello world".to_string(),
|
||||||
);
|
);
|
||||||
let result = sender.send(email);
|
let result = sender.send(&email);
|
||||||
assert!(result.is_ok());
|
assert!(result.is_ok());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -37,7 +37,7 @@ fn bench_reuse_send(b: &mut test::Bencher) {
|
|||||||
"id".to_string(),
|
"id".to_string(),
|
||||||
"Hello world".to_string(),
|
"Hello world".to_string(),
|
||||||
);
|
);
|
||||||
let result = sender.send(email);
|
let result = sender.send(&email);
|
||||||
assert!(result.is_ok());
|
assert!(result.is_ok());
|
||||||
});
|
});
|
||||||
sender.close()
|
sender.close()
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ impl<S: Connector + Write + Read + Timeout + Debug> Client<S> {
|
|||||||
return Err(From::from("Connection closed"));
|
return Err(From::from("Connection closed"));
|
||||||
}
|
}
|
||||||
|
|
||||||
self.stream.as_mut().unwrap().write(string)?;
|
self.stream.as_mut().unwrap().write_all(string)?;
|
||||||
self.stream.as_mut().unwrap().flush()?;
|
self.stream.as_mut().unwrap().flush()?;
|
||||||
|
|
||||||
debug!(
|
debug!(
|
||||||
|
|||||||
Reference in New Issue
Block a user