1616public struct TypeSelector < S: Shape > : Selector {
1717 public init ( ) { }
1818 public func select( using model: Model , shape: Shape ) -> Bool {
19- return type ( of: shape) == S . self
19+ type ( of: shape) == S . self
2020 }
2121}
2222
2323/// Return true is shape is a number type
2424public struct NumberSelector : Selector {
2525 public init ( ) { }
2626 public func select( using model: Model , shape: Shape ) -> Bool {
27- return
28- shape is ByteShape ||
29- shape is ShortShape ||
30- shape is IntegerShape ||
31- shape is LongShape ||
32- shape is FloatShape ||
33- shape is DoubleShape ||
34- shape is BigDecimalShape ||
35- shape is BigIntegerShape ||
36- shape is IntEnumShape
27+ shape is ByteShape || shape is ShortShape || shape is IntegerShape || shape is LongShape || shape is FloatShape || shape is DoubleShape
28+ || shape is BigDecimalShape || shape is BigIntegerShape || shape is IntEnumShape
3729 }
3830}
3931
4032/// Return true if shape is a simple type
4133public struct SimpleTypeSelector : Selector {
4234 public init ( ) { }
4335 public func select( using model: Model , shape: Shape ) -> Bool {
44- return
45- shape is BlobShape ||
46- shape is StringShape ||
47- shape is BooleanShape ||
48- shape is ByteShape ||
49- shape is ShortShape ||
50- shape is IntegerShape ||
51- shape is LongShape ||
52- shape is FloatShape ||
53- shape is DoubleShape ||
54- shape is BigDecimalShape ||
55- shape is BigIntegerShape ||
56- shape is TimestampShape ||
57- shape is IntEnumShape ||
58- shape is EnumShape ||
59- shape is DocumentShape
36+ shape is BlobShape || shape is StringShape || shape is BooleanShape || shape is ByteShape || shape is ShortShape || shape is IntegerShape
37+ || shape is LongShape || shape is FloatShape || shape is DoubleShape || shape is BigDecimalShape || shape is BigIntegerShape
38+ || shape is TimestampShape || shape is IntEnumShape || shape is EnumShape || shape is DocumentShape
6039 }
6140}
6241
6342/// Return true if shape is either a list or a set
6443public struct CollectionSelector : Selector {
6544 public init ( ) { }
6645 public func select( using model: Model , shape: Shape ) -> Bool {
67- return shape is ListShape
46+ shape is ListShape
6847 }
6948}
7049
@@ -103,7 +82,7 @@ public struct OrTargetSelector: Selector {
10382public struct TraitSelector < T: StaticTrait > : Selector {
10483 public init ( ) { }
10584 public func select( using model: Model , shape: Shape ) -> Bool {
106- return shape. trait ( type: T . self) != nil
85+ shape. trait ( type: T . self) != nil
10786 }
10887}
10988
@@ -116,6 +95,6 @@ public struct TraitNameSelector: Selector {
11695 }
11796
11897 public func select( using model: Model , shape: Shape ) -> Bool {
119- return shape. trait ( named: self . name) != nil
98+ shape. trait ( named: self . name) != nil
12099 }
121100}
0 commit comments