Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/free.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Trait to instruct how to properly drop and free pointers.

use std::ptr::{drop_in_place, NonNull};

use internal::gen_free;

/// Trait to instruct how to properly drop and free pointers.
///
/// Implemented for pointers which can be freed.
pub trait Free {
/// Drops the content pointed by this pointer and frees it.
Expand Down
8 changes: 6 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,14 @@ extern crate core as std;
extern crate libc;
extern crate stable_deref_trait;

#[doc(hidden)] // TODO: Remove `pub` as breaking change
pub mod free;
mod internal;
#[doc(hidden)] // TODO: Remove `pub` as breaking change
pub mod mbox;
#[doc(hidden)] // TODO: Remove `pub` as breaking change
pub mod sentinel;

pub use mbox::MBox;
pub use sentinel::{MArray, MString};
pub use self::free::Free;
pub use self::mbox::{MBox, MSliceIntoIter};
pub use self::sentinel::{MArray, MString, Sentinel};
2 changes: 0 additions & 2 deletions src/mbox.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//! `malloc`-based Box.

use stable_deref_trait::StableDeref;

use std::cmp::Ordering;
Expand Down
2 changes: 0 additions & 2 deletions src/sentinel.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//! Sentinel-terminated types.

use libc::{c_char, strlen};
use stable_deref_trait::StableDeref;

Expand Down