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

Refactor get_or_create_resources() #291

Merged
merged 2 commits into from
Aug 7, 2024

Conversation

Heinenen
Copy link
Collaborator

@Heinenen Heinenen commented Aug 6, 2024

The goal of this PR is to make the code more understandable and less verbose.

Reasons which prompted me to look into this:

  • get_or_create_resources_mut has a weird name, as it is just a helper function for get_or_create_resources, which also returns something mutable
  • Err(Error::ObjectNotFound) should not be an error but a panic, because this code path is only reached in case of a bug in lopdf

Heinenen and others added 2 commits August 6, 2024 18:02
@J-F-Liu J-F-Liu merged commit 03997e5 into J-F-Liu:master Aug 7, 2024
8 checks passed
@Heinenen Heinenen deleted the refactor/create_resources branch August 7, 2024 11:14
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.

None yet

2 participants