TyOverby / irc-message

An IRC message parser for Rust.
BSD 3-Clause "New" or "Revised" License
8 stars 3 forks source link

Don't use strings #4

Open sp3d opened 9 years ago

sp3d commented 9 years ago

IRC messages can be pretty much arbitrary sequences of bytes, and are fairly often not valid UTF-8. Libraries for handling IRC messages should use Vec/&[u8] rather than Rust strings.

TyOverby commented 8 years ago

I don't like sacrificing the ease-of-use of the library. 99.99% of IRC messages are valid UTF-8, so I don't want to make the user go through the hassle of doing conversions on his side.

That said, there might be a way to make this library generic enough to get both of those features without losing the nice API.