Skip to content

Commit

Permalink
Remove unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
gavrilikhin-d committed Jul 23, 2024
1 parent c154d87 commit 337cd77
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,9 @@ unsafe impl Send for Context {}
impl Context {
/// Get raw [`LLVMContextRef`].
///
/// # Safety
///
/// This function is exposed only for interoperability with other LLVM IR libraries.
/// It's not intended to be used by most users, hence marked as unsafe.
pub unsafe fn raw(&self) -> LLVMContextRef {
/// It's not intended to be used by most users.
pub fn raw(&self) -> LLVMContextRef {
self.context.0
}

Expand Down Expand Up @@ -1340,11 +1338,9 @@ pub struct ContextRef<'ctx> {
impl<'ctx> ContextRef<'ctx> {
/// Get raw [`LLVMContextRef`].
///
/// # Safety
///
/// This function is exposed only for interoperability with other LLVM IR libraries.
/// It's not intended to be used by most users, hence marked as unsafe.
pub unsafe fn raw(&self) -> LLVMContextRef {
/// It's not intended to be used by most users.
pub fn raw(&self) -> LLVMContextRef {
self.context.0
}

Expand Down

0 comments on commit 337cd77

Please sign in to comment.