a2aaron / bytebot

Posts randomly generated bytebeats with video output to twitter every few hours.
https://twitter.com/bytebeat_bot
3 stars 0 forks source link

Make it possible to get the code back out of the compile error #66

Closed porglezomp closed 6 years ago

porglezomp commented 6 years ago

Similar to from_utf8 we take ownership of the Vec<Cmd>, and we should be able to get the code back out like in FromUtf8Error::into_bytes. We should probably have a CompileError::into_code method that consumes the error and returns the code, and maybe a as_code method that borrows a code slice.