These are chat archives for rust-lang/rust

9th
Oct 2017
Zakarum
@omni-viral
Oct 09 2017 08:37
Guys. I need to create a futures::Stream wrapper which will be clonable. It's ok to skip items. If clone is't polled and there was few items produced it should just yield last one. There is futures::future::Shared. I'd copy implementation for my wrapper but there are too much locks.
Restioson
@Restioson
Oct 09 2017 15:42
Having a problem with rustcsv/serde. For some reason, this always results in an error along the lines of missing field "latitude": https://gist.github.com/Restioson/a362b26f64c28e078f3a3b16297c701d#file-csv-rs-L195
Restioson
@Restioson
Oct 09 2017 15:59
Both Data and the data labels have latitude though
Zakarum
@omni-viral
Oct 09 2017 16:34
I have some problems with associated consts.
This should compile https://play.rust-lang.org/?gist=5a8ec755b791133ec92b41e115a89944&version=stable
But it doesn't
Diggory Blake
@Diggsey
Oct 09 2017 16:37
@omni-viral looks like a bug...
Restioson
@Restioson
Oct 09 2017 17:33
looks like it tbh
Says trait must be implemented, but even adding struct Y; impl Size for Y { const SIZE: usize = 1usize; } doesn't make it work
Zakarum
@omni-viral
Oct 09 2017 18:30
Yeap. You can't use associated const in this context if your type is parameter rather then concrete type.
There is an issue about wrong error in this case.
Joseph Delgado
@veryjos
Oct 09 2017 23:32
hey
i'm considering writing a web API in Rust
i'm somewhat familiar with the language
how scared should i be of the panic! situation?
it seems like if a third party lib throws a panic!, for whatever reason (scariest would be user input), the whole thread has to die?
is this a reasonable concern?
i saw some ways to control panic! in the docs, but they mention that if a panic! is configured to abort, you can't do anything about it