Skip to content

fix panic when slice str#177

Merged
imsnif merged 3 commits intoimsnif:mainfrom
zxlzy:debug/slice-str
Sep 1, 2020
Merged

fix panic when slice str#177
imsnif merged 3 commits intoimsnif:mainfrom
zxlzy:debug/slice-str

Conversation

@zxlzy
Copy link
Copy Markdown
Contributor

@zxlzy zxlzy commented Aug 4, 2020

fix that #176

@zxlzy zxlzy force-pushed the debug/slice-str branch from be955a2 to 7fe03a6 Compare August 4, 2020 12:48
@imsnif
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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