austinjones / lifeline-rs

A dependency injection library for message-based applications
MIT License
38 stars 3 forks source link

[TASK] Update to Tokio 1.0 #55

Closed mjonuschat closed 3 years ago

mjonuschat commented 3 years ago

Changes for tokio-0.3 compatibility:

Changes for Tokio 1.0 compatibility:

mjonuschat commented 3 years ago

Tests are passing on Rust 1.49.0 / MacOS:

❯ cargo test

running 6 tests
test spawn::tests::lifeline_running_completes ... ok
test spawn::tests::lifeline_running_await_times_out ... ok
test channel::barrier::tests::sender_receiver ... ok
test channel::barrier::tests::drop_sends ... ok
test channel::barrier::tests::simple_barrier ... ok
test channel::barrier::tests::multiple_receivers ... ok

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests lifeline

running 29 tests
test src/dyn_bus/macros.rs - lifeline_bus (line 18) ... ok
test src/bus.rs - bus::Bus (line 68) ... ok
test src/channel/barrier.rs - channel::barrier::Barrier (line 46) ... ok
test src/dyn_bus/macros.rs - lifeline_bus (line 24) ... ok
test src/channel/barrier.rs - channel::barrier::barrier (line 20) ... ok
test src/bus.rs - bus::Resource (line 46) ... ok
test src/dyn_bus/macros.rs - lifeline_bus (line 4) ... ok
test src/lib.rs - (line 37) ... ok
test src/channel/barrier.rs - channel::barrier::BarrierReceiver (line 107) ... ok
test src/bus.rs - bus::Bus::resource (line 166) ... ok
test src/service.rs - service::CarryFrom (line 101) ... ok
test src/service.rs - service::Service (line 17) ... ok
test src/service.rs - service::Task (line 194) ... ok
test src/bus.rs - bus::Bus::rx (line 108) ... ok
test src/bus.rs - bus::Bus::tx (line 139) ... ok
test src/bus.rs - bus::Message (line 16) ... ok
test src/spawn.rs - spawn::Lifeline (line 133) ... ok
test src/bus.rs - bus::Bus::capacity (line 79) ... ok
test src/storage.rs - impl_channel_clone (line 116) ... ok
test src/storage.rs - impl_channel_take (line 72) ... ok
test src/request.rs - request::Request (line 7) ... ok
test src/storage.rs - impl_storage_clone (line 95) ... ok
test src/storage.rs - impl_storage_take (line 52) ... ok
test src/storage.rs - storage::Storage (line 21) ... ok
test src/storage.rs - storage::Storage (line 7) ... ok
test src/test.rs - assert_completes (line 31) ... ok
test src/test.rs - assert_completes (line 46) ... ok
test src/test.rs - assert_times_out (line 103) ... ok
test src/test.rs - assert_times_out (line 88) ... ok

test result: ok. 29 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
austinjones commented 3 years ago

Hi @mjonuschat, Thanks for the PR! This looks great.