summary history branches tags files
commit:d2b787df0d823b1441deb2b04401a5e2e2d8d1c5
author:Trevor Bentley
committer:GitHub
date:Mon Apr 2 11:24:18 2018 +0000
parents:0a371064e04fae1b5a1e2ce2a76f83c9ff6be818, fb4fe95e4a6070ab43610c56146f6ac227045469
Merge pull request #8 from mrmekon/fix_objc_nightly

Fix objc nightly
diff --git a/Cargo.toml b/Cargo.toml
line changes: +3/-3
index ea14e14..fe7c1d5
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,15 +16,15 @@ dummy = []
 
 [dependencies]
 time = "0.1"
-log = {version = "0.3", optional = true }
+log = {version = "0.4", optional = true }
 
 [dependencies.log4rs]
-version = "0.6"
+version = "0.8"
 optional = true
 features = ["rolling_file_appender"]
 
 [dev-dependencies]
-log = "0.3"
+log = "0.4"
 
 [target."cfg(target_os = \"macos\")".dependencies]
 objc-foundation = "0.1.1"

diff --git a/src/lib.rs b/src/lib.rs
line changes: +4/-4
index 3c354cf..dd0da39
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -323,7 +323,7 @@ pub fn create_logger(filename: &str,
                      dir: LogDir,
                      max_size_mb: u32,
                      backup_count: u32) -> Result<String, String> {
-    use log::LogLevelFilter;
+    use log::LevelFilter;
     use self::log4rs::append::console::ConsoleAppender;
     use self::log4rs::append::rolling_file::RollingFileAppender;
     use self::log4rs::append::rolling_file::policy::compound::CompoundPolicy;
@@ -351,12 +351,12 @@ pub fn create_logger(filename: &str,
     let config = Config::builder()
         .appender(Appender::builder().build("stdout", Box::new(stdout)))
         .appender(Appender::builder().build("requests", Box::new(rolling)))
-        .logger(Logger::builder().build("app::backend::db", LogLevelFilter::Info))
+        .logger(Logger::builder().build("app::backend::db", LevelFilter::Info))
         .logger(Logger::builder()
                 .appender("requests")
                 .additive(false)
-                .build("app::requests", LogLevelFilter::Info))
-        .build(Root::builder().appender("stdout").appender("requests").build(LogLevelFilter::Info))
+                .build("app::requests", LevelFilter::Info))
+        .build(Root::builder().appender("stdout").appender("requests").build(LevelFilter::Info))
         .unwrap();
     match log4rs::init_config(config) {
         Ok(_) => Ok(log_path),

diff --git a/src/osx.rs b/src/osx.rs
line changes: +9/-9
index 1e924e1..93a0034
--- a/src/osx.rs
+++ b/src/osx.rs
@@ -403,7 +403,7 @@ impl Trampoline {
                                            initWithBytes:app.as_ptr()
                                            length:app.len()
                                            encoding: 4]; // UTF8_ENCODING
-            msg_send![wspace, launchApplication: s];
+            let _:() = msg_send![wspace, launchApplication: s];
 
             // Note: launchedApplication doesn't return until the child process
             // calls [NSApplication sharedApplication].
@@ -457,7 +457,7 @@ impl FruitApp {
             ActivationPolicy::Prohibited => 2,
         };
         unsafe {
-            msg_send![self.app, setActivationPolicy: policy_int];
+            let _:() = msg_send![self.app, setActivationPolicy: policy_int];
         }
     }
 
@@ -480,7 +480,7 @@ impl FruitApp {
         unsafe {
             let cls = objc::runtime::Class::get("NSApplication").unwrap();
             let app: *mut objc::runtime::Object = msg_send![cls, sharedApplication];
-            let _ = msg_send![app, terminate: exit_code];
+            let _:() = msg_send![app, terminate: exit_code];
         }
     }
 
@@ -525,13 +525,13 @@ impl FruitApp {
             unsafe {
                 let run_count = self.run_count.get();
                 if run_count == 0 {
-                    let _ = msg_send![self.app, finishLaunching];
+                    let _:() = msg_send![self.app, finishLaunching];
                 }
                 // Create a new release pool every once in a while, draining the old one
                 if run_count % 100 == 0 {
                     let old_pool = self.pool.get();
                     if run_count != 0 {
-                        let _ = msg_send![old_pool, drain];
+                        let _:() = msg_send![old_pool, drain];
                     }
                     let cls = Class::get("NSAutoreleasePool").unwrap();
                     let pool: *mut Object = msg_send![cls, alloc];
@@ -544,8 +544,8 @@ impl FruitApp {
                                                    untilDate: nil
                                                    inMode: mode
                                                    dequeue: 1];
-                let _ = msg_send![self.app, sendEvent: event];
-                let _ = msg_send![self.app, updateWindows];
+                let _:() = msg_send![self.app, sendEvent: event];
+                let _:() = msg_send![self.app, updateWindows];
                 self.run_count.set(run_count + 1);
             }
             if period == RunPeriod::Once {
@@ -615,8 +615,8 @@ impl FruitApp {
             let ini: *mut Object = msg_send![bundle,
                                              pathForResource:objc_name
                                              ofType:objc_ext];
-            let _ = msg_send![objc_name, release];
-            let _ = msg_send![objc_ext, release];
+            let _:() = msg_send![objc_name, release];
+            let _:() = msg_send![objc_ext, release];
             let cstr: *const i8 = msg_send![ini, UTF8String];
             if cstr != std::ptr::null() {
                 let rstr = std::ffi::CStr::from_ptr(cstr).to_string_lossy().into_owned();