mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
update error enum
This commit is contained in:
parent
5a30b63a27
commit
b2bceb775a
2 changed files with 4 additions and 6 deletions
|
|
@ -126,7 +126,7 @@ impl Body {
|
||||||
// Continue bytes read..
|
// Continue bytes read..
|
||||||
self.read_all_async(connection, cancelable, priority, chunk, callback);
|
self.read_all_async(connection, cancelable, priority, chunk, callback);
|
||||||
}
|
}
|
||||||
Err(reason) => callback(Err((Error::InputStream, Some(reason.message())))),
|
Err(reason) => callback(Err((Error::InputStreamRead, Some(reason.message())))),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -140,7 +140,7 @@ impl Body {
|
||||||
|
|
||||||
// Validate overflow
|
// Validate overflow
|
||||||
if total > self.max_size {
|
if total > self.max_size {
|
||||||
return Err(Error::Overflow);
|
return Err(Error::BufferOverflow);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Success
|
// Success
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
Buffer,
|
|
||||||
Decode,
|
Decode,
|
||||||
Format,
|
InputStreamRead,
|
||||||
InputStream,
|
BufferOverflow,
|
||||||
Overflow,
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue