Skip to content

error: use of deprecated try macro #73

@White-Rabbit-Scientific

Description

@White-Rabbit-Scientific

From the example on the home page: https://github.com/dcuddeback/serial-rs/tree/master/serial

rustc -V --> rustc 1.72.1

   Compiling rust_serial v0.1.0 (C:\Users\r\GitHub\rust_serial)
error: use of deprecated `try` macro
  --> src\main.rs:18:5
   |
18 | /     try!(port.reconfigure(&|settings| {
19 | |         try!(settings.set_baud_rate(serial::Baud9600));
20 | |         settings.set_char_size(serial::Bits8);
21 | |         settings.set_parity(serial::ParityNone);
...  |
24 | |         Ok(())
25 | |     }));
   | |_______^
   |
   = note: in the 2018 edition `try` is a reserved keyword, and the `try!()` macro is deprecated
help: you can use the `?` operator instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions