Skip to content

Commit 609d429

Browse files
bors[bot]asomers
andauthored
Merge #1215
1215: Remove sys::socket::addr::from_libc_sockaddr from the public API r=posborne a=asomers 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 . Co-authored-by: Alan Somers <[email protected]>
2 parents e61ae4a + 494d4f7 commit 609d429

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
@@ -44,6 +44,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4444

4545
### Removed
4646

47+
- Removed `sys::socket::addr::from_libc_sockaddr` from the public API.
48+
(#[1215](https://github.com/nix-rust/nix/pull/1215))
49+
4750
## [0.17.0] - 3 February 2020
4851
### Added
4952
- 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)