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 {
339339 fn cast_zeronotequal ( self ) -> Result < Self , ErrorKind > ;
340340
341341 /// 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+ }
343345
344346 /// Cast by changing `[X]` to `or_i([X], 0)` or `or_i(0, [X])`
345347 fn cast_or_i_false ( self ) -> Result < Self , ErrorKind > ;
346348
347349 /// Cast by changing `[X]` to `or_i([X], 0)`. Default implementation
348350 /// simply passes through to `cast_or_i_false`
349351 fn cast_unlikely ( self ) -> Result < Self , ErrorKind > {
350- self . cast_or_i_false ( )
352+ Self :: or_i ( self , Self :: from_false ( ) )
351353 }
352354
353355 /// Cast by changing `[X]` to `or_i(0, [X])`. Default implementation
354356 /// simply passes through to `cast_or_i_false`
355357 fn cast_likely ( self ) -> Result < Self , ErrorKind > {
356- self . cast_or_i_false ( )
358+ Self :: or_i ( Self :: from_false ( ) , self )
357359 }
358360
359361 /// Computes the type of an `AndB` fragment
You can’t perform that action at this time.
0 commit comments