Skip to content

Commit

Permalink
Merge pull request #112 from jpsim/nn-gardening
Browse files Browse the repository at this point in the history
Misc changes
  • Loading branch information
norio-nomura authored Mar 18, 2018
2 parents a936d0b + e544b16 commit 2dddbfe
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 56 deletions.
2 changes: 1 addition & 1 deletion Sources/Yams/Constructor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ private extension Substring {
extension Constructor {
@available(*, unavailable, message: "Use `Constructor.ScalarMap` instead")
public typealias Map = [Tag.Name: (Node) -> Any?]

@available(*, unavailable, message: "Use `Constructor.defaultScalarMap` instead")
public static let defaultMap: ScalarMap = [:]
}
Expand Down
4 changes: 1 addition & 3 deletions Sources/Yams/Decoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ private struct _Decoder: Decoder {
}
}

private struct _KeyedDecodingContainer<K: CodingKey> : KeyedDecodingContainerProtocol {

typealias Key = K
private struct _KeyedDecodingContainer<Key: CodingKey> : KeyedDecodingContainerProtocol {

private let decoder: _Decoder
private let mapping: Node.Mapping
Expand Down
3 changes: 1 addition & 2 deletions Sources/Yams/Encoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ private class _ReferencingEncoder: _Encoder {
}
}

private struct _KeyedEncodingContainer<K: CodingKey> : KeyedEncodingContainerProtocol {
typealias Key = K
private struct _KeyedEncodingContainer<Key: CodingKey> : KeyedEncodingContainerProtocol {

private let encoder: _Encoder

Expand Down
2 changes: 1 addition & 1 deletion Tests/YamsTests/EncoderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Yams
// swiftlint:disable identifier_name line_length

/// Tests are copied from https://github.com/apple/swift/blob/master/test/stdlib/TestJSONEncoder.swift
class EncoderTests: XCTestCase {
class EncoderTests: XCTestCase { // swiftlint:disable:this type_body_length
// MARK: - Encoding Top-Level Empty Types
func testEncodingTopLevelEmptyStruct() {
let empty = EmptyStruct()
Expand Down
25 changes: 0 additions & 25 deletions Yams.xcodeproj/CYaml_Info.plist

This file was deleted.

32 changes: 9 additions & 23 deletions Yams.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
OBJ_1 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0930;
TargetAttributes = {
OBJ_45 = {
LastSwiftMigration = 0900;
Expand Down Expand Up @@ -402,11 +402,13 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
Expand Down Expand Up @@ -450,11 +452,13 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
Expand Down Expand Up @@ -492,20 +496,15 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
ENABLE_TESTABILITY = YES;
INFOPLIST_FILE = Yams.xcodeproj/Yams_Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = Yams;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGET_NAME = Yams;
WARNING_CFLAGS = "-Wall";
};
Expand All @@ -516,20 +515,15 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
ENABLE_TESTABILITY = YES;
INFOPLIST_FILE = Yams.xcodeproj/Yams_Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = Yams;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGET_NAME = Yams;
WARNING_CFLAGS = "-Wall";
};
Expand All @@ -540,13 +534,9 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
INFOPLIST_FILE = Yams.xcodeproj/YamsTests_Info.plist;
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGET_NAME = YamsTests;
};
name = Debug;
Expand All @@ -556,13 +546,9 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
INFOPLIST_FILE = Yams.xcodeproj/YamsTests_Info.plist;
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGET_NAME = YamsTests;
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion Yams.xcodeproj/xcshareddata/xcschemes/Yams.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down

0 comments on commit 2dddbfe

Please sign in to comment.