fengsp / pencil

A web application microframework for Rust
https://fengsp.github.io/pencil/
Other
872 stars 43 forks source link

Provide immutable APIs #34

Open golddranks opened 7 years ago

golddranks commented 7 years ago

At the moment, at least the Request.form() API borrows Request as mutable. Does it need to? Because it limits the other things one can do with Request as long as the mutable borrow is live. Many std APIs provide getter() and getter_mut() to avoid this kind of a problem.