These are chat archives for rust-lang/rust

25th
Dec 2016
Alexander Ronald Altman
@pthariensflame
Dec 25 2016 04:24
Doesn't one inherit from the other?
Peter Atashian
@retep998
Dec 25 2016 05:48
@pthariensflame Nope!
xialvjun
@xialvjun
Dec 25 2016 06:05
The Deref rule: If you have a type U, and it implements Deref<Target=T>, values of &U will automatically coerce to a &T. But why must we add an &, why not just values of U will automatically coerce to a T.
Aleksey Kladov
@matklad
Dec 25 2016 09:34
@xialvjun If you convert T to U by value, then you'll consume and lose the originalT.
Converting references allows you to get a "view" into T, without destroying it.
xialvjun
@xialvjun
Dec 25 2016 10:57
Without mut, I won't lose it. ..... Oh, you mean if it's T, then the ownership will be passed to the parameter, that will make me lose the original T? ....Got it. Then will &mut U be coerced to &mut T? I think it doesn't against any rule.
mhsjlw
@mhsjlw
Dec 25 2016 12:12
I've been looking at web libraries becuase I'd like to try out rust for a web server and I found rouille
i like the API, but it doesn't benchmark as well as I like it considering it is not non-blocking
can anyone recommend anything? I'm a novice level rustacean
mhsjlw
@mhsjlw
Dec 25 2016 16:06
Rocket looks interesting, and it's trending on GitHub, i'll take a look at it
Adrian Utrilla
@autrilla
Dec 25 2016 16:10
Keep in mind it's very new
There's still things that haven't been figured out
mhsjlw
@mhsjlw
Dec 25 2016 17:05
a.k.a. all of rust
:D
Matanel Levi
@matanelevi
Dec 25 2016 17:45
@matklad I don't get how Cell differs from Rc, to be specific, I don't get why Send exist, it sounds like Sync is enough. I think that it is enough to say thatRcisn't Sync. How the compiler knows that it can move a Cell to some thread, but disallow multithreading?