internalise things made public by accident (#463)

Motivation:

A few things are public by accident, this makes those internal for NIO
2.0.0.

Modifications:

internalise a few things

Result:

less public API
This commit is contained in:
Johannes Weiss authored and GitHub committed 2018-12-17 19:19:40 +00:00
1 parent bc21c9a7ac
commit e415d654a5
4 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -103,7 +103,7 @@ extension ByteBuffer {
extension FixedWidthInteger {
/// Returns the next power of two.
public func nextPowerOf2() -> Self {
func nextPowerOf2() -> Self {
guard self != 0 else {
return 1
}
@@ -115,7 +115,7 @@ extension UInt32 {
/// Returns the next power of two unless that would overflow, in which case UInt32.max (on 64-bit systems) or
/// Int32.max (on 32-bit systems) is returned. The returned value is always safe to be cast to Int and passed
/// to malloc on all platforms.
public func nextPowerOf2ClampedToMax() -> UInt32 {
func nextPowerOf2ClampedToMax() -> UInt32 {
guard self > 0 else {
return 1
}
+1 -1
View File
@@ -16,7 +16,7 @@
/// RangeReplaceableCollection. It defines the append method that is present
/// on RangeReplaceableCollection, which makes all RangeReplaceableCollections
/// trivially able to implement this protocol.
public protocol AppendableCollection: Collection {
protocol AppendableCollection: Collection {
mutating func append(_ newElement: Self.Iterator.Element)
}
+1 -1
View File
@@ -79,7 +79,7 @@ extension IOError: CustomStringConvertible {
}
/// An result for an IO operation that was done on a non-blocking resource.
public enum IOResult<T: Equatable> {
enum IOResult<T: Equatable> {
/// Signals that the IO operation could not be completed as otherwise we would need to block.
case wouldBlock(T)
+1 -1
View File
@@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//
/// The container used for writing multiple buffers via `writev`.
public typealias IOVector = iovec
typealias IOVector = iovec
// TODO: scattering support
/* final but tests */ class Socket: BaseSocket {