mrmekon / circadian

Suspend-On-Idle Daemon for GNU/Linux Power Management
GNU General Public License v3.0
254 stars 16 forks source link

Some warnings when compiling because of Rust changes #9

Closed brothersadcase closed 5 years ago

brothersadcase commented 5 years ago

This isn't much of an issue but I just thought I'd mention you have some warnings because Rust's changed. I don't really know Rust, so I won't submit a pull request.

warning: trait objects without an explicit `dyn` are deprecated
  --> src/main.rs:64:32
   |
64 |     fn cause(&self) -> Option<&std::error::Error> {
   |                                ^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn std::error::Error`
   |
   = note: #[warn(bare_trait_objects)] on by default

warning: use of deprecated item 'std::sync::atomic::ATOMIC_BOOL_INIT': the `new` function is now preferred
  --> src/main.rs:43:37
   |
43 | use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
   |                                     ^^^^^^^^^^^^^^^^
   |
   = note: #[warn(deprecated)] on by default

warning: use of deprecated item 'std::sync::atomic::ATOMIC_BOOL_INIT': the `new` function is now preferred
   --> src/main.rs:235:38
    |
235 | static SIGUSR_SIGNALED: AtomicBool = ATOMIC_BOOL_INIT;
    |                                      ^^^^^^^^^^^^^^^^ help: replace the use of the deprecated item: `AtomicBool::new(false)`
mrmekon commented 5 years ago

Thanks, fixed in #10