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

feat: Use RPITIT instead of Box<dyn ...> #121

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

Conversation

mlgiraud
Copy link

Just a small PR to replace Box<dyn ...> with RPITIT, since it is now stable. I believe this is what your todo in the trait was for?

@mlgiraud
Copy link
Author

Maybe it would also make sense to return a type that implements the Error trait, instead of something that just implements Debug?

@mlgiraud
Copy link
Author

mlgiraud commented Jul 15, 2024

Another question maybe: Why does the fetch function have to take a mutable reference to self? Shouldn't this be an immutable function?

EDIT: This makes it practically impossible to have the parser borrow data from an input cache, and also pass the input cache to the write function for the error report, since this would require a mutable borrow of the input cache, when the input cache is already borrowed read only for the parsed data.

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