Skip to content

Commit

Permalink
feat(s2n-quic-platform): make message methods public (#2189)
Browse files Browse the repository at this point in the history
Need described in #2188
  • Loading branch information
dignifiedquire authored Apr 23, 2024
1 parent 9730578 commit fed54a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions quic/s2n-quic-platform/src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ impl Storage {
}

#[inline]
pub(crate) fn as_ptr(&self) -> *mut u8 {
pub fn as_ptr(&self) -> *mut u8 {
self.ptr.as_ptr()
}

/// Asserts that the pointer is in bounds of the allocation
#[inline]
pub(crate) fn check_bounds<T: Sized>(&self, ptr: *mut T) {
pub fn check_bounds<T: Sized>(&self, ptr: *mut T) {
let start = self.as_ptr();
let end = unsafe {
// Safety: pointer is allocated with the self.layout
Expand Down
4 changes: 2 additions & 2 deletions quic/s2n-quic-platform/src/message/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ pub struct Message {

impl Message {
#[inline]
pub(crate) fn remote_address(&self) -> &SocketAddress {
pub fn remote_address(&self) -> &SocketAddress {
&self.address
}

#[inline]
pub(crate) fn set_remote_address(&mut self, remote_address: &SocketAddress) {
pub fn set_remote_address(&mut self, remote_address: &SocketAddress) {
let remote_address = *remote_address;

self.address = remote_address;
Expand Down

0 comments on commit fed54a5

Please sign in to comment.