Make nodoc work for Codable
This commit is contained in:
@@ -25,7 +25,7 @@ public extension CodingUserInfoKey {
|
|||||||
*/
|
*/
|
||||||
extension Path: Codable {
|
extension Path: Codable {
|
||||||
/// - SeeAlso: `CodingUserInfoKey.relativePath`
|
/// - SeeAlso: `CodingUserInfoKey.relativePath`
|
||||||
// :nodoc:
|
/// :nodoc:
|
||||||
public init(from decoder: Decoder) throws {
|
public init(from decoder: Decoder) throws {
|
||||||
let value = try decoder.singleValueContainer().decode(String.self)
|
let value = try decoder.singleValueContainer().decode(String.self)
|
||||||
if value.hasPrefix("/") {
|
if value.hasPrefix("/") {
|
||||||
@@ -39,7 +39,7 @@ extension Path: Codable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// - SeeAlso: `CodingUserInfoKey.relativePath`
|
/// - SeeAlso: `CodingUserInfoKey.relativePath`
|
||||||
// :nodoc:
|
/// :nodoc:
|
||||||
public func encode(to encoder: Encoder) throws {
|
public func encode(to encoder: Encoder) throws {
|
||||||
var container = encoder.singleValueContainer()
|
var container = encoder.singleValueContainer()
|
||||||
if let root = encoder.userInfo[.relativePath] as? Path {
|
if let root = encoder.userInfo[.relativePath] as? Path {
|
||||||
|
|||||||
Reference in New Issue
Block a user