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

Heap's Algorithm bug #1347

Closed
LaurenceMason opened this issue Jun 27, 2024 · 1 comment
Closed

Heap's Algorithm bug #1347

LaurenceMason opened this issue Jun 27, 2024 · 1 comment

Comments

@LaurenceMason
Copy link

LaurenceMason commented Jun 27, 2024

  • Copilot Chat Extension Version: v1.208.0
  • VS Code Version: 1.90.2
  • OS Version: Windows 10 Enterprise 22H2
  • Logs:

Steps to Reproduce:

  1. Rust - start a new rust project. cargo new perms_test.
  2. Delete the code from the main.rs file.
  3. Ask Copilot to generate Heap's Algorithm as an iterator.

Fix:

  1. The last permutation is not returned because the last expression of the 'next' is 'None'.
  2. The last expression of the 'fn next' should be 'Some(result)' rather than 'None'
  3. The tests do not detect this because 'zip' only zips the shortest of the two sequences.
  4. The tests need to also check that the count of the permutations == the length of the expected permutations.
@github-actions github-actions bot added the triage-needed Issues needing to be assigned to the prospective feature owner label Jun 27, 2024
@ulugbekna
Copy link
Contributor

Thank you for bringing this to our attention. We appreciate your feedback and understand your concerns. Copilot Chat leverages a large language model (LLM), which, while advanced, can occasionally make mistakes. We continuously strive to improve its accuracy and performance, and your input is invaluable in this process.

@ulugbekna ulugbekna removed the triage-needed Issues needing to be assigned to the prospective feature owner label Jul 5, 2024
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

No branches or pull requests

3 participants