minor cleanup

This commit is contained in:
John Estropia
2017-07-04 12:21:46 +09:00
parent 961f39a806
commit a11915db12

View File

@@ -50,13 +50,11 @@ public struct Where: FetchClause, QueryClause, DeleteClause, Hashable {
*/ */
public static func && (left: Where, right: Where?) -> Where { public static func && (left: Where, right: Where?) -> Where {
if right != nil { if let right = right {
return left && right!
}
else {
return left return left && right
} }
return left
} }
/** /**
@@ -67,13 +65,11 @@ public struct Where: FetchClause, QueryClause, DeleteClause, Hashable {
*/ */
public static func && (left: Where?, right: Where) -> Where { public static func && (left: Where?, right: Where) -> Where {
if left != nil { if let left = left {
return left && right return left && right
} }
else { return right
return right
}
} }
/** /**
@@ -92,13 +88,11 @@ public struct Where: FetchClause, QueryClause, DeleteClause, Hashable {
*/ */
public static func || (left: Where, right: Where?) -> Where { public static func || (left: Where, right: Where?) -> Where {
if right != nil { if let right = right {
return left || right!
}
else {
return left return left || right
} }
return left
} }
/** /**
@@ -109,13 +103,11 @@ public struct Where: FetchClause, QueryClause, DeleteClause, Hashable {
*/ */
public static func || (left: Where?, right: Where) -> Where { public static func || (left: Where?, right: Where) -> Where {
if left != nil { if let left = left {
return left || right return left || right
} }
else { return right
return right
}
} }
/** /**