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 panic when slice str #177

Merged
merged 3 commits into from
Sep 1, 2020
Merged

fix panic when slice str #177

merged 3 commits into from
Sep 1, 2020

Conversation

zxlzy
Copy link
Contributor

@zxlzy zxlzy commented Aug 4, 2020

fix that #176

@imsnif
Copy link
Owner

imsnif commented Aug 19, 2020

Hey @zxlzy - following my comment here (#176 (comment)) would you like to adjust the function like in diskonaut: https://github.com/imsnif/diskonaut/blob/main/src/ui/format/truncate.rs#L17-L37 ?
If I'm not mistaken, I think this is mostly copy/pasting and making sure tests/formatting pass (and that it solves the problem for you). Would be happy to hear your thoughts.

@zxlzy
Copy link
Contributor Author

zxlzy commented Aug 19, 2020

@imsnif You are right. I have copy some code from diskonaut and make sure it passed all existing test cases. Because of I am a greenhand of rust programming. I can't add test cases for split Chinese for now.

@imsnif
Copy link
Owner

imsnif commented Sep 1, 2020

Hey @zxlzy, thanks for this! I don't think it's critical to add test cases for this. It looks good to me. I'll fix the CI issues on main.

@imsnif imsnif merged commit f4009e4 into imsnif:main Sep 1, 2020
imsnif added a commit that referenced this pull request Sep 1, 2020
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