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

Fixed compiler warnings as directed by compiler hints. #191

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

petertrotman
Copy link

cargo 1.38.0 (23ef9a4ef 2019-08-20)
rustc 1.38.0 (625451e37 2019-09-23)

Previously:

warning: trait objects without an explicit `dyn` are deprecated
  --> src/cmd/headers.rs:60:22
   |
60 |     let mut wtr: Box<io::Write> =
   |                      ^^^^^^^^^ help: use `dyn`: `dyn io::Write`
   |
   = note: `#[warn(bare_trait_objects)]` on by default

warning: trait objects without an explicit `dyn` are deprecated
   --> src/cmd/join.rs:281:44
    |
281 |         -> CliResult<IoState<fs::File, Box<io::Write+'static>>> {
    |                                            ^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Write+'static`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/cmd/partition.rs:138:36
    |
138 | type BoxedWriter = csv::Writer<Box<io::Write+'static>>;
    |                                    ^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Write+'static`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/cmd/split.rs:131:36
    |
131 |     ) -> CliResult<csv::Writer<Box<io::Write+'static>>> {
    |                                    ^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Write+'static`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/config.rs:197:48
    |
197 |                  -> io::Result<csv::Writer<Box<io::Write+'static>>> {
    |                                                ^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Write+'static`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/config.rs:202:48
    |
202 |                  -> io::Result<csv::Reader<Box<io::Read+'static>>> {
    |                                                ^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read+'static`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/config.rs:263:47
    |
263 |     pub fn io_reader(&self) -> io::Result<Box<io::Read+'static>> {
    |                                               ^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Read+'static`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/config.rs:293:47
    |
293 |     pub fn io_writer(&self) -> io::Result<Box<io::Write+'static>> {
    |                                               ^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Write+'static`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/util.rs:190:48
    |
190 |                  -> io::Result<csv::Writer<Box<io::Write+'static>>>
    |                                                ^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn io::Write+'static`

warning: trait objects without an explicit `dyn` are deprecated
   --> tests/tests.rs:105:29
    |
105 |     fn shrink(&self) -> Box<Iterator<Item=CsvRecord>+'static> {
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn Iterator<Item=CsvRecord>+'static`
    |
    = note: `#[warn(bare_trait_objects)]` on by default

warning: trait objects without an explicit `dyn` are deprecated
   --> tests/tests.rs:151:29
    |
151 |     fn shrink(&self) -> Box<Iterator<Item=CsvData>+'static> {
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn Iterator<Item=CsvData>+'static`

warning: use of deprecated item 'std::sync::atomic::ATOMIC_USIZE_INIT': the `new` function is now preferred
  --> tests/workdir.rs:17:39
   |
17 | static NEXT_ID: atomic::AtomicUsize = atomic::ATOMIC_USIZE_INIT;
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the use of the deprecated item: `AtomicUsize::new(0)`
   |
   = note: `#[warn(deprecated)]` on by default

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

Successfully merging this pull request may close these issues.

None yet

1 participant