Skip to content

Commit 494d4f7

Browse files
committed
Remove sys::socket::addr::from_libc_sockaddr from the public API
This function never should've been public, since it's basically impossible to use directly. It's only public due to an oversight from PR #667 .
1 parent b5ee610 commit 494d4f7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3131

3232
### Removed
3333

34+
- Removed `sys::socket::addr::from_libc_sockaddr` from the public API.
35+
(#[1215](https://github.com/nix-rust/nix/pull/1215))
36+
3437
## [0.17.0] - 3 February 2020
3538
### Added
3639
- Add `CLK_TCK` to `SysconfVar`

src/sys/socket/addr.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,12 @@ impl SockAddr {
714714
///
715715
/// Supports only the following address families: Unix, Inet (v4 & v6), Netlink and System.
716716
/// Returns None for unsupported families.
717-
pub unsafe fn from_libc_sockaddr(addr: *const libc::sockaddr) -> Option<SockAddr> {
717+
///
718+
/// # Safety
719+
///
720+
/// unsafe because it takes a raw pointer as argument. The caller must
721+
/// ensure that the pointer is valid.
722+
pub(crate) unsafe fn from_libc_sockaddr(addr: *const libc::sockaddr) -> Option<SockAddr> {
718723
if addr.is_null() {
719724
None
720725
} else {

0 commit comments

Comments
 (0)