File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -339,21 +339,23 @@ pub trait Property: Sized {
339
339
fn cast_zeronotequal ( self ) -> Result < Self , ErrorKind > ;
340
340
341
341
/// Cast by changing `[X]` to `AndV([X], True)`
342
- fn cast_true ( self ) -> Result < Self , ErrorKind > ;
342
+ fn cast_true ( self ) -> Result < Self , ErrorKind > {
343
+ Self :: and_v ( self , Self :: from_true ( ) )
344
+ }
343
345
344
346
/// Cast by changing `[X]` to `or_i([X], 0)` or `or_i(0, [X])`
345
347
fn cast_or_i_false ( self ) -> Result < Self , ErrorKind > ;
346
348
347
349
/// Cast by changing `[X]` to `or_i([X], 0)`. Default implementation
348
350
/// simply passes through to `cast_or_i_false`
349
351
fn cast_unlikely ( self ) -> Result < Self , ErrorKind > {
350
- self . cast_or_i_false ( )
352
+ Self :: or_i ( self , Self :: from_false ( ) )
351
353
}
352
354
353
355
/// Cast by changing `[X]` to `or_i(0, [X])`. Default implementation
354
356
/// simply passes through to `cast_or_i_false`
355
357
fn cast_likely ( self ) -> Result < Self , ErrorKind > {
356
- self . cast_or_i_false ( )
358
+ Self :: or_i ( Self :: from_false ( ) , self )
357
359
}
358
360
359
361
/// Computes the type of an `AndB` fragment
You can’t perform that action at this time.
0 commit comments