These are chat archives for rust-lang/rust

19th
Dec 2017
Sebastian Blei
@iamsebastian
Dec 19 2017 09:11

Could anybody give a hint, howto implement

impl From<Result<T, SomeError>> for Result<T, AnotherError>

? :)

Sherab Giovannini
@Shaddy
Dec 19 2017 15:11
If I do implement each method it would work but...
Sherab Giovannini
@Shaddy
Dec 19 2017 15:23
btw type sh ould be type LPVOID = *mut c_void;
Roman Akberov
@RomanAkberov
Dec 19 2017 15:27
    fn as_mut_ptr(&mut self) -> LPVOID {
        self as *mut Self as LPVOID
    }
Sherab Giovannini
@Shaddy
Dec 19 2017 15:40
omg
                let writer = rx
                    .map_err(|()| unreachable!("rx can't fail"))
                    .fold(to_client, |to_client, packet| {
                        to_client.send(packet)
                    });

gives me

    |
139 |                     .fold(to_client, |to_client, packet| {
    |                      ^^^^ the trait `std::convert::From<std::io::Error>` is not implemented for `()`

why?

Denis Lisov
@tanriol
Dec 19 2017 19:06
What are you doing with the writer?
Tarık Binar
@ttarikbnr
Dec 19 2017 19:17
Hi, are there any example which shows how to use rlib?
Roman Proskuryakov
@kpp
Dec 19 2017 19:44
@tanriol I have already fixed it
By copying the code from below
Tarık Binar
@ttarikbnr
Dec 19 2017 22:31
How can i use arbitrary .rlib. Are there any example or something?
Denis Lisov
@tanriol
Dec 19 2017 22:34
@ttarikbnr Could you please describe what you want to achieve in some more detail?
Moggers
@Moggers
Dec 19 2017 23:51
is there a way to sleep without relinquishing my processor time to the OS?
I want to do software pulse width modulation