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

fix: Remove unnecessary file write operation when resetting viewed list #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Smarandii
Copy link

  • Removed the code block that opens 'viewed.txt' for writing.
  • Simplified the else condition to only reset the viewed_list to an empty list.
  • The previous implementation unnecessarily performed a file write operation, which could lead to potential performance issues and unnecessary I/O operations.
  • This change ensures that the viewed_list is reset without affecting file I/O, improving the efficiency of the code.

No functional impact expected as the viewed_list is still reset correctly.

- Removed the code block that opens 'viewed.txt' for writing.
- Simplified the else condition to only reset the viewed_list to an empty list.
- The previous implementation unnecessarily performed a file write operation, which could lead to potential performance issues and unnecessary I/O operations.
- This change ensures that the viewed_list is reset without affecting file I/O, improving the efficiency of the code.

No functional impact expected as the viewed_list is still reset correctly.
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.

1 participant