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 alloc build #170

Merged
merged 1 commit into from
Jun 12, 2019
Merged

Fix alloc build #170

merged 1 commit into from
Jun 12, 2019

Conversation

philipc
Copy link
Collaborator

@philipc philipc commented Jun 6, 2019

I don't know if there's a better way to do the number printing without io::Write.

@@ -93,7 +92,25 @@ impl SectionTable {
if idx <= 9_999_999 { // 10^7 - 1
self.name = [0; 8];
self.name[0] = b'/';
write!(&mut self.name[1..], "{}", idx).unwrap();
if idx == 0 {
Copy link
Owner

Choose a reason for hiding this comment

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

i literally have no idea what this is doing 😆

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's doing write!(&mut self.name[1..], "{}", idx) without using io::Write. I could add some comments to make it clearer.

Copy link
Owner

Choose a reason for hiding this comment

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

If you want to. Probably what you said right here is sufficient :) feel free to merge after

@philipc philipc merged commit e57f2d4 into m4b:master Jun 12, 2019
@philipc philipc deleted the alloc branch June 12, 2019 08:50
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.

2 participants