Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sqlx-postgres/src/arguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub struct PgArguments {
}

impl PgArguments {
pub(crate) fn add<'q, T>(&mut self, value: T) -> Result<(), BoxDynError>
pub(crate) fn add<'q, T>(&mut self, value: T) -> Result<(), Error>
where
T: Encode<'q, Postgres> + Type<Postgres>,
{
Expand All @@ -82,7 +82,7 @@ impl PgArguments {
// reset the value buffer to its previous value if encoding failed,
// so we don't leave a half-encoded value behind
self.buffer.reset_to_snapshot(buffer_snapshot);
return Err(error);
return Err(Error::Encode(error));
};

// remember the type information for this value
Expand Down Expand Up @@ -134,7 +134,7 @@ impl<'q> Arguments<'q> for PgArguments {
self.buffer.reserve(size);
}

fn add<T>(&mut self, value: T) -> Result<(), BoxDynError>
fn add<T>(&mut self, value: T) -> Result<(), Error>
where
T: Encode<'q, Self::Database> + Type<Self::Database>,
{
Expand Down