Skip to content

Commit

Permalink
fix Swift 3 SwiftLint violations
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsim committed Sep 14, 2016
1 parent 6cda901 commit 50139cb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions RealmSwift/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ happening when initializing a Realm instance.

*/
public struct Error {
public enum Code : Int {
public enum Code: Int {
/// Error thrown by Realm if no other specific error is returned when a realm is opened.
case fail

Expand Down Expand Up @@ -120,7 +120,7 @@ public struct Error {
}

/// :nodoc:
public var _nsError: NSError
public var _nsError: NSError // swiftlint:disable:this variable_name

/// :nodoc:
public init(_nsError error: NSError) {
Expand All @@ -130,13 +130,13 @@ public struct Error {

/// :nodoc:
// Provide bridging from errors with domain RLMErrorDomain to Error.
extension Error : _BridgedStoredNSError {
extension Error: _BridgedStoredNSError {
/// :nodoc:
public static var _nsErrorDomain = RLMErrorDomain
public static var _nsErrorDomain = RLMErrorDomain // swiftlint:disable:this variable_name
}

/// :nodoc:
extension Error.Code : _ErrorCodeProtocol {
extension Error.Code: _ErrorCodeProtocol {
/// :nodoc:
public typealias _ErrorType = RLMError
}
Expand Down
2 changes: 1 addition & 1 deletion RealmSwift/List.swift
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ extension List : RealmCollection, RangeReplaceableCollection {
- parameter subRange: The range of elements to be replaced.
- parameter newElements: The new elements to be inserted into the List.
*/
public func replaceSubrange<C : Collection>(_ subrange: Range<Int>, with newElements: C)
public func replaceSubrange<C: Collection>(_ subrange: Range<Int>, with newElements: C)
where C.Iterator.Element == T {
for _ in subrange.lowerBound..<subrange.upperBound {
remove(objectAtIndex: subrange.lowerBound)
Expand Down
2 changes: 1 addition & 1 deletion RealmSwift/RealmCollectionType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Encapsulates iteration state and interface for iteration over a `RealmCollection
*/
public final class RLMIterator<T: Object>: IteratorProtocol {
private var i: UInt = 0
private let generatorBase : NSFastEnumerationIterator
private let generatorBase: NSFastEnumerationIterator

init(collection: RLMCollection) {
generatorBase = NSFastEnumerationIterator(collection)
Expand Down
2 changes: 1 addition & 1 deletion RealmSwift/Tests/SortDescriptorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SortDescriptorTests: TestCase {
}

func testStringLiteralConvertible() {
let literalSortDescriptor : RealmSwift.SortDescriptor = "property"
let literalSortDescriptor: RealmSwift.SortDescriptor = "property"
XCTAssertEqual(sortDescriptor, literalSortDescriptor,
"SortDescriptor should conform to StringLiteralConvertible")
}
Expand Down

0 comments on commit 50139cb

Please sign in to comment.