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..
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
if total > self.max_size {
return Err(Error::Overflow);
return Err(Error::BufferOverflow);
}
// Success

View file

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