update error enum

This commit is contained in:
yggverse 2024-10-28 02:55:25 +02:00
parent 5a30b63a27
commit b2bceb775a
2 changed files with 4 additions and 6 deletions

View file

@ -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

View file

@ -1,7 +1,5 @@
pub enum Error { pub enum Error {
Buffer,
Decode, Decode,
Format, InputStreamRead,
InputStream, BufferOverflow,
Overflow,
} }