Skip to content

Conversation

@Jgprog117
Copy link

Summary

Resolves #1202 by consolidating duplicate enum definitions.

Changes

  • Removed duplicate enum definition from
  • Added import to use the existing definition from module
  • Both enums were identical, ensuring no functional changes

Impact

This eliminates code duplication and establishes a single source of truth for the enumeration, improving maintainability.

Fixes #1202

Removed duplicate HypervisorType enum definition from sandbox/hypervisor.rs
and added import to use the existing definition from virtual_machine module.

Both enums were identical, so consolidating reduces code duplication and
ensures a single source of truth for the hypervisor type enumeration.

Fixes hyperlight-dev#1202

Signed-off-by: Jgprog117 <gustafsonjosef@gmail.com>
@Jgprog117 Jgprog117 force-pushed the fix/consolidate-hypervisor-type-enum branch from e4e3563 to 17cd14d Compare January 31, 2026 11:37
@dblnz dblnz added the kind/refactor For PRs that restructure or remove code without adding new functionality. label Feb 2, 2026
Copy link
Contributor

@dblnz dblnz left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!
I left some comments.

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like there are also a couple other things that are defined in both files.

I've had a look, and it looks like this file is not used at all, it may be an artifact of some conflict.
Can you remove it please?

If it turns out to not be used at all, could you modify the PR title and/or commit message to reflect that?

Copy link
Contributor

Choose a reason for hiding this comment

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

agree with this! Thanks a lot for you contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor For PRs that restructure or remove code without adding new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate duplicate enum HypervisorType

3 participants