Stop including string content in index panics?

Hmm, this is particularly gratuitous right now:

byte index 1000 is out of bounds of aseirughaoirughaoerghaoerghaorvlijesr;oibgfhs;eroignvs;eorigjhvas;loijhvsoeruifpsioreuyhfgvosliueryhvglaiueyrhvfgliuhrlukvzyhrvlkusrdyhvlkzuyrsvhlkuyhfgbrlixuyvlikzurhfclsvkurdygvhskrerghaierughaslierughaseirughaergiuhaeriuhager

Echoing the whole string seems clearly wrong and unnecessary, so at least this one I think we should just do. Maybe make a PR for that part and we can nominate for libs/libs-api discussion? (Feel free to r? @scottmcm.)

The single USV, however, does seem particularly useful as friendliness to the developer, especially the new developer not yet used to how rust does indexing, so I'd be more reticent to remove the "inside 'ã'" part. (Removing the "of ãchoo" part seems obvious, like the previous case.)

How much of a problem does the single USV cause? My instinct is that that wouldn't trigger the same GDPR-and-similar problems the full string could...

5 Likes