mirror of
https://github.com/apple/swift-nio-imap
synced 2026-11-28 05:14:27 +00:00
NIOIMAPCore and its tests no longer depend on swift-nio; NIOIMAP declares
the dependency it was getting transitively. Hand edits: Package.swift and
NIOIMAPCore.md. Everything else is the output of, on the parent
commit (zsh):
F=($(grep -rlE '^import ((struct|enum|class|protocol) )?NIO(Core|TestUtils)?(\.[A-Za-z]+)?$' \
Sources/NIOIMAPCore Tests/NIOIMAPCoreTests))
perl -0pi -e 's/^import (?:(?:struct|enum|class|protocol) )?NIO(?:Core|TestUtils)?(?:\.\w+)?\n//mg;
s/\n\n\n+/\n\n/g' $F
Public break: depending on NIOIMAPCore no longer provides swift-nio.
32 lines
1.0 KiB
Swift
32 lines
1.0 KiB
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the SwiftNIO open source project
|
|
//
|
|
// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors
|
|
// Licensed under Apache License v2.0
|
|
//
|
|
// See LICENSE.txt for license information
|
|
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
import struct OrderedCollections.OrderedDictionary
|
|
|
|
// MARK: - Encoding
|
|
|
|
extension EncodeBuffer {
|
|
@discardableResult mutating func writeNamespaceResponseExtensions(
|
|
_ extensions: OrderedDictionary<[UInt8], [[UInt8]]>
|
|
) -> Int {
|
|
extensions.reduce(into: 0) { (res, ext) in
|
|
res +=
|
|
self.writeSpace() + self.writeIMAPString(ext.0) + self.writeSpace()
|
|
+ self.writeArray(ext.1) { (string, self) in
|
|
self.writeIMAPString(string)
|
|
}
|
|
}
|
|
}
|
|
}
|