This is an interesting crate, but why limit it to the stdin ? I was interested to use it on string. An why not files ?
Activity
sinistersnare commentedon Oct 12, 2015
Maybe we can have a second argument for this, defaulting to
stdin()so
let stuff: String = read!("<b><i>{}</i></b>");would be equivalent to
let stuff: String = read!("<b><i>{}</i></b>", stdin());so that we could do
let stuff: String = read!("<b><i>{}</i></b>", html_input_string);gbersac commentedon Oct 12, 2015
@sinistersnare agree
oli-obk commentedon Oct 13, 2015
sorry, this issue must've gotten lost in my emails... That's a great Idea, I'll address it.
oli-obk commentedon Oct 13, 2015
Doing files is hard... You usually want to continue reading in the file with a new
read!call or similar... so right now it looks likeWhich is quite a mouthful for reading from a file.
Until we get impl specialization, there's not much I can do except add a macro for turning a filename into a bytes iterator to the file.