Skip to content

Commit

Permalink
delete blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanderc committed Apr 29, 2024
1 parent 4921b29 commit b47b93b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions heed/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2103,14 +2103,12 @@ impl<KC, DC, C> Database<KC, DC, C> {
match result {
// the value was successfully inserted
Ok(()) => Ok(None),

// the key already exists: the previous value is stored in the data parameter
Err(MdbError::KeyExist) => {
let bytes = unsafe { crate::from_val(data_val) };
let data = DC::bytes_decode(bytes).map_err(Error::Decoding)?;
Ok(Some(data))
}

Err(error) => Err(error.into()),
}
}
Expand Down Expand Up @@ -2263,14 +2261,12 @@ impl<KC, DC, C> Database<KC, DC, C> {
Err(io::Error::from(io::ErrorKind::UnexpectedEof).into())
}
}

// the key already exists: the previous value is stored in the data parameter
Err(MdbError::KeyExist) => {
let bytes = unsafe { crate::from_val(reserved) };
let data = DC::bytes_decode(bytes).map_err(Error::Decoding)?;
Ok(Some(data))
}

Err(error) => Err(error.into()),
}
}
Expand Down

0 comments on commit b47b93b

Please sign in to comment.