Skip to content

Commit

Permalink
Fix final lint and jazzy errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adora Lynch committed Nov 8, 2024
1 parent 0d4734b commit af53a98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Sources/Yams/Anchor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import Foundation

/// A representation of a YAML tag see: https://yaml.org/spec/1.2.2/
/// Types interested in Encoding and Decoding Anchors should conform to YamlAnchorProviding and YamlAnchorCoding respectively.
/// Types interested in Encoding and Decoding Anchors should
/// conform to YamlAnchorProviding and YamlAnchorCoding respectively.
public final class Anchor: RawRepresentable, ExpressibleByStringLiteral, Codable, Hashable {

/// A CharacterSet containing only characters which are permitted by the underlying cyaml implementation
Expand Down
8 changes: 5 additions & 3 deletions Sources/Yams/RedundancyAliasingStrategy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
//

/// An enum indicating the outcome of a `RedundancyAliasingStrategy`
/// if the strategy returns `anchor` the encoder will encode an Anchor
/// if the strategy returns `alias` the encoder will encode an alias to an anchor which should already have been specified.
/// If the strategy returns none the encoder will encode without an anchor or an alias
public enum RedundancyAliasingOutcome {
/// encoder will encode an Anchor
case anchor(Anchor)
/// encoder will encode an alias to an anchor which should already have been specified.
case alias(Anchor)
/// encoder will encode without an anchor or an alias
case none
}

Expand Down Expand Up @@ -48,6 +48,7 @@ public class HashableAliasingStrategy: RedundancyAliasingStrategy {

let uniqueAliasProvider = UniqueAliasProvider()

/// Initialize a new HashableAliasingStrategy
public init() {}

public func alias(for encodable: any Encodable) throws -> RedundancyAliasingOutcome {
Expand Down Expand Up @@ -81,6 +82,7 @@ public class StrictEncodableAliasingStrategy: RedundancyAliasingStrategy {

let uniqueAliasProvider = UniqueAliasProvider()

/// Initialize a new StrictEncodableAliasingStrategy
public init() {}

private let encoder = YAMLEncoder()
Expand Down

0 comments on commit af53a98

Please sign in to comment.