Skip to content

Commit

Permalink
Merge pull request #4110 from weiznich/fix/4108
Browse files Browse the repository at this point in the history
Remove the unsound `SerializedDatabase::new` function
  • Loading branch information
pksunkara authored and weiznich committed Jul 16, 2024
1 parent 385c53a commit e380c52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion diesel/src/sqlite/connection/serialized_database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ pub struct SerializedDatabase {

impl SerializedDatabase {
/// Creates a new `SerializedDatabase` with the given data pointer and length.
pub fn new(data: *mut u8, len: usize) -> Self {
///
/// SAFETY: The data pointer needs to be returned by sqlite
/// and the length must match the underlying buffer pointer
pub(crate) unsafe fn new(data: *mut u8, len: usize) -> Self {
Self { data, len }
}

Expand Down

0 comments on commit e380c52

Please sign in to comment.