Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo check: Trait objects without an explicit dyn are deprecated #20

Closed
hbina opened this issue Mar 5, 2020 · 1 comment
Closed

cargo check: Trait objects without an explicit dyn are deprecated #20

hbina opened this issue Mar 5, 2020 · 1 comment

Comments

@hbina
Copy link
Contributor

hbina commented Mar 5, 2020

cargo check is complaining,

warning: trait objects without an explicit `dyn` are deprecated
   --> src/division.rs:542:21
    |
542 |     writeable: &mut Write,
    |                     ^^^^^ help: use `dyn`: `dyn Write`
    |
    = note: `#[warn(bare_trait_objects)]` on by default

warning: trait objects without an explicit `dyn` are deprecated
   --> src/division.rs:756:36
    |
756 | pub fn write_digit(writeable: &mut Write, digit: u8) -> Result<bool, DivisionError>
    |                                    ^^^^^ help: use `dyn`: `dyn Write`

warning: trait objects without an explicit `dyn` are deprecated
  --> src/error.rs:56:23
   |
56 |     ExternalError(Box<Error + Send + Sync>)
   |                       ^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn Error + Send + Sync`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/fraction/display.rs:192:45
    |
192 | pub fn format_sign(sign: Sign, buffer: &mut fmt::Write, format: &Format) -> fmt::Result {
    |                                             ^^^^^^^^^^ help: use `dyn`: `dyn fmt::Write`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/fraction/display.rs:225:18
    |
225 |     buffer: &mut fmt::Write,
    |                  ^^^^^^^^^^ help: use `dyn`: `dyn fmt::Write`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/fraction/display.rs:351:20
    |
351 |     V: FnOnce(&mut fmt::Write, &Format) -> Result<usize, fmt::Error>,
    |                    ^^^^^^^^^^ help: use `dyn`: `dyn fmt::Write`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/fraction/display.rs:343:18
    |
343 |     buffer: &mut fmt::Write,
    |                  ^^^^^^^^^^ help: use `dyn`: `dyn fmt::Write`

    Finished dev [unoptimized + debuginfo] target(s) in 0.13s

I am not sure if it will break anything, but its quite a simple fix.

@dnsl48
Copy link
Owner

dnsl48 commented Mar 9, 2020

fixed by #21

@dnsl48 dnsl48 closed this as completed Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants