Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@udoprog
Copy link
Owner

@udoprog udoprog commented Jan 13, 2023

Solves #6

This introduces a new suite of methods while maintaining the existing ones as a default behavior.

The new suite of methods and behaviors are:

  • The Set type can be generically constructed with a custom shift indexing either through the set! macro or using the Set::new_with constructor.
  • A new bittle::set_shr! has been introduces to explicitly build sets with shift-right indexing.
  • Right-shift indexing can be explicitly used with a new family of methods where it's appropriate using names suffixed with *_shr.
  • Generic shift indexing can be used with a new family of methods where it's appropriate using names suffixed with *_with. These take a generic argument which must be one of the following newly introduces types: DefaultShift, Shl (for shift-left indexing), or Shr (for shift-right indexing).

@udoprog udoprog added the enhancement New feature or request label Jan 13, 2023
@udoprog udoprog force-pushed the custom-shift-indexing branch from f7c1a4c to 4beae87 Compare January 13, 2023 00:32
@udoprog udoprog merged commit 9f3c34c into main Jan 13, 2023
@udoprog udoprog deleted the custom-shift-indexing branch January 13, 2023 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants