Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AlgebraicValue::take + move test-code in btree_index to tests #1028

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Mar 27, 2024

Description of Changes

Some cleanup:

  • Add AlgebraicValue::take -- I had another use for this in a different PR, and it makes the intent a bit clearer.
  • Move some test code in btree_index to tests.

API and ABI breaking changes

None

Expected complexity level and risk

1

Testing

Just code motion really, no semantic changes.

@Centril Centril requested a review from mamcx March 27, 2024 09:19
@@ -112,6 +113,11 @@ pub enum AlgebraicValue {

#[allow(non_snake_case)]
impl AlgebraicValue {
/// Extract the value and replace it with a dummy one that is cheap to make.
pub fn take(&mut self) -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use this value U8(0)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason other than probably being the cheapest AlgebraicValue possible to make.

Copy link
Contributor

@mamcx mamcx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Centril Centril added this pull request to the merge queue Mar 27, 2024
Merged via the queue into master with commit b6c0e1c Mar 27, 2024
6 checks passed
@Centril Centril deleted the centril/misc-cleanup branch September 5, 2024 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants