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

node: Infallible pdu encoding #2079

Closed
wants to merge 2 commits into from
Closed

Conversation

herr-seppia
Copy link
Member

No description provided.

@herr-seppia herr-seppia requested a review from goshawk-3 August 6, 2024 15:14
@herr-seppia herr-seppia marked this pull request as ready for review August 6, 2024 15:14
@herr-seppia herr-seppia added the type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc) label Aug 6, 2024
@herr-seppia herr-seppia force-pushed the infallible-pdu-encode branch from 5c865a4 to 51172f0 Compare August 6, 2024 15:27
fn write_to_vec(&self) -> Vec<u8> {
let mut buffer = vec![];
self.write(&mut buffer)
.expect("Writing to vec should succeed");
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure that there are no cases where an encoding may fail due to a programmer mistake/edge case thus panicking ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe you're right
I was too much tempted to remove those if let that I didn't take it into consideration

I'm going to move this back to draft and tackle it later in a better way

@herr-seppia herr-seppia marked this pull request as draft August 7, 2024 07:26
@herr-seppia herr-seppia closed this Aug 9, 2024
@herr-seppia herr-seppia deleted the infallible-pdu-encode branch August 9, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants