We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
assert!
1 parent c691145 commit 0345ff6Copy full SHA for 0345ff6
src/unix.rs
@@ -22,7 +22,9 @@ pub struct Acquired {
22
23
impl Client {
24
pub fn new(mut limit: usize) -> io::Result<Client> {
25
- assert!(limit <= 4096, "Can't have limit larger than 4096 since the pipe would block forever when writing to it");
+ if limit > 4096 {
26
+ return Err(io::Error::new(io::ErrorKind::Other, "Can't have limit larger than 4096 since the pipe would block forever when writing to it"));
27
+ }
28
29
let client = unsafe { Client::mk()? };
30
0 commit comments