@@ -1133,72 +1133,6 @@ macro_rules! impl_ranged {
11331133 }
11341134 }
11351135
1136- impl <const MIN : $internal, const MAX : $internal> PartialEq <$internal> for $type<MIN , MAX > {
1137- #[ inline( always) ]
1138- fn eq( & self , other: & $internal) -> bool {
1139- <Self as $crate:: traits:: RangeIsValid >:: ASSERT ;
1140- self . get( ) == * other
1141- }
1142- }
1143-
1144- impl <const MIN : $internal, const MAX : $internal> PartialEq <$type<MIN , MAX >> for $internal {
1145- #[ inline( always) ]
1146- fn eq( & self , other: & $type<MIN , MAX >) -> bool {
1147- <$type<MIN , MAX > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1148- * self == other. get( )
1149- }
1150- }
1151-
1152- impl <
1153- const MIN_A : $internal,
1154- const MAX_A : $internal,
1155- const MIN_B : $internal,
1156- const MAX_B : $internal,
1157- > PartialEq <Option <$type<MIN_B , MAX_B >>> for $optional_type<MIN_A , MAX_A > {
1158- #[ inline( always) ]
1159- fn eq( & self , other: & Option <$type<MIN_B , MAX_B >>) -> bool {
1160- <$type<MIN_A , MAX_A > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1161- <$type<MIN_B , MAX_B > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1162- self . get( ) . map( $type:: get) == other. map( $type:: get)
1163- }
1164- }
1165-
1166- impl <
1167- const MIN_A : $internal,
1168- const MAX_A : $internal,
1169- const MIN_B : $internal,
1170- const MAX_B : $internal,
1171- > PartialEq <$optional_type<MIN_B , MAX_B >> for Option <$type<MIN_A , MAX_A >> {
1172- #[ inline( always) ]
1173- fn eq( & self , other: & $optional_type<MIN_B , MAX_B >) -> bool {
1174- <$type<MIN_A , MAX_A > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1175- <$type<MIN_B , MAX_B > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1176- self . map( $type:: get) == other. get( ) . map( $type:: get)
1177- }
1178- }
1179-
1180- impl <
1181- const MIN : $internal,
1182- const MAX : $internal,
1183- > PartialEq <Option <$internal>> for $optional_type<MIN , MAX > {
1184- #[ inline( always) ]
1185- fn eq( & self , other: & Option <$internal>) -> bool {
1186- <$type<MIN , MAX > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1187- self . get( ) . map( $type:: get) == * other
1188- }
1189- }
1190-
1191- impl <
1192- const MIN : $internal,
1193- const MAX : $internal,
1194- > PartialEq <$optional_type<MIN , MAX >> for Option <$internal> {
1195- #[ inline( always) ]
1196- fn eq( & self , other: & $optional_type<MIN , MAX >) -> bool {
1197- <$type<MIN , MAX > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1198- * self == other. get( ) . map( $type:: get)
1199- }
1200- }
1201-
12021136 impl <
12031137 const MIN_A : $internal,
12041138 const MAX_A : $internal,
@@ -1213,28 +1147,6 @@ macro_rules! impl_ranged {
12131147 }
12141148 }
12151149
1216- impl <
1217- const MIN : $internal,
1218- const MAX : $internal,
1219- > PartialOrd <$internal> for $type<MIN , MAX > {
1220- #[ inline]
1221- fn partial_cmp( & self , other: & $internal) -> Option <Ordering > {
1222- <Self as $crate:: traits:: RangeIsValid >:: ASSERT ;
1223- self . get( ) . partial_cmp( other)
1224- }
1225- }
1226-
1227- impl <
1228- const MIN : $internal,
1229- const MAX : $internal,
1230- > PartialOrd <$type<MIN , MAX >> for $internal {
1231- #[ inline]
1232- fn partial_cmp( & self , other: & $type<MIN , MAX >) -> Option <Ordering > {
1233- <$type<MIN , MAX > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1234- self . partial_cmp( & other. get( ) )
1235- }
1236- }
1237-
12381150 impl <
12391151 const MIN_A : $internal,
12401152 const MAX_A : $internal,
@@ -1257,56 +1169,6 @@ macro_rules! impl_ranged {
12571169 }
12581170 }
12591171
1260- impl <
1261- const MIN_A : $internal,
1262- const MAX_A : $internal,
1263- const MIN_B : $internal,
1264- const MAX_B : $internal,
1265- > PartialOrd <Option <$type<MIN_A , MAX_A >>> for $optional_type<MIN_B , MAX_B > {
1266- #[ inline]
1267- fn partial_cmp( & self , other: & Option <$type<MIN_A , MAX_A >>) -> Option <Ordering > {
1268- <$type<MIN_B , MAX_B > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1269- <$type<MIN_A , MAX_A > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1270- self . get( ) . map( $type:: get) . partial_cmp( & other. map( $type:: get) )
1271- }
1272- }
1273-
1274- impl <
1275- const MIN_A : $internal,
1276- const MAX_A : $internal,
1277- const MIN_B : $internal,
1278- const MAX_B : $internal,
1279- > PartialOrd <$optional_type<MIN_B , MAX_B >> for Option <$type<MIN_A , MAX_A >> {
1280- #[ inline]
1281- fn partial_cmp( & self , other: & $optional_type<MIN_B , MAX_B >) -> Option <Ordering > {
1282- <$type<MIN_A , MAX_A > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1283- <$type<MIN_B , MAX_B > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1284- self . map( $type:: get) . partial_cmp( & other. get( ) . map( $type:: get) )
1285- }
1286- }
1287-
1288- impl <
1289- const MIN : $internal,
1290- const MAX : $internal,
1291- > PartialOrd <Option <$internal>> for $optional_type<MIN , MAX > {
1292- #[ inline]
1293- fn partial_cmp( & self , other: & Option <$internal>) -> Option <Ordering > {
1294- <$type<MIN , MAX > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1295- self . get( ) . map( $type:: get) . partial_cmp( other)
1296- }
1297- }
1298-
1299- impl <
1300- const MIN : $internal,
1301- const MAX : $internal,
1302- > PartialOrd <$optional_type<MIN , MAX >> for Option <$internal> {
1303- #[ inline]
1304- fn partial_cmp( & self , other: & $optional_type<MIN , MAX >) -> Option <Ordering > {
1305- <$type<MIN , MAX > as $crate:: traits:: RangeIsValid >:: ASSERT ;
1306- self . partial_cmp( & other. get( ) . map( $type:: get) )
1307- }
1308- }
1309-
13101172 impl <
13111173 const MIN : $internal,
13121174 const MAX : $internal,
0 commit comments