These are chat archives for rust-lang/rust

Jun 2018
Joseph Murphy
Jun 03 2018 04:42
Anyone interested in a community supported (hopefully cross-platform) Dropbox client? Me and a couple friends are thinking of taking the plunge and reinventing the wheel here. First killer feature would be support for .dropboxignore files
Oh yeah and also writing a codegen crate for Dropbox's Stone spec format (to generate a Rust SDK)
Fredrik Portström
Jun 03 2018 07:50
@ozgurakkurt The code you posted works without a problem. I think you may have omitted the code that causes that problem.
@ozgurakkurt I would suggest using the convenience function req.path() rather than req.uri().path().
Jun 03 2018 08:30
how to count data in table?
Jun 03 2018 08:50
Table? As in a database table? How are you accessing the database? Via an ORM (Diesel perhaps? ||
Jun 03 2018 09:44
i tried to use count_star(), but i got an error;
|                                      ^^^^^ cannot infer type for `U`
Jun 03 2018 18:14
@rnleach @portstrom I was moving the request object so it was causing a problem. I solved it by using the req.into_parts() method
Sylwester Rąpała
Jun 03 2018 19:12

I have a struct like this:

pub struct MyStruct {
    hash: String,

And I would like to derefer it to string:

impl ops::Deref for MyStruct {
    type Target = str;

    fn deref(&self) -> &Self::Target {

Is this make any sense? I just wanna sure in MyStruct string is allways proper and if required send it just as a string to a function

Jun 03 2018 23:37
Is there an example anywhere of a rocket-rs app accepting (upgrading) a websocket request?