Repository: LiveSplit/livesplit-core
Pull request #153 (2018-12-10 20:11:37)

Port livesplit-core to Rust 2018


Patch:
diff --git a/Cargo.toml b/Cargo.toml
index 4ed89b2..aadaec2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,6 +16,7 @@ include = [
     "/CODE_OF_CONDUCT.md",
     "/README.md"
 ]
+edition = "2018"
 
 [badges]
 travis-ci = { repository = "LiveSplit/livesplit-core" }
@@ -39,7 +40,7 @@ livesplit-hotkey = { path = "hotkey", version = "0.4.0" }
 odds = { version = "0.3.1", default-features = false }
 ordered-float = "1.0.0"
 palette = { version = "0.4.0", default-features = false }
-parking_lot = { version = "0.6.2", default-features = false }
+parking_lot = { version = "0.7.0", default-features = false }
 quick-error = "1.2.2"
 quick-xml = "0.13.0"
 serde = "1.0.55"
diff --git a/benches/balanced_pb.rs b/benches/balanced_pb.rs
index 55dcd52..49d5475 100644
--- a/benches/balanced_pb.rs
+++ b/benches/balanced_pb.rs
@@ -1,8 +1,5 @@
 #![feature(test)]
 
-extern crate livesplit_core;
-extern crate test;
-
 use test::Bencher;
 
 use livesplit_core::comparison::balanced_pb::BalancedPB;
diff --git a/benches/parsing.rs b/benches/parsing.rs
index 5753868..d0a59a9 100644
--- a/benches/parsing.rs
+++ b/benches/parsing.rs
@@ -1,8 +1,5 @@
 #![feature(test)]
 
-extern crate livesplit_core;
-extern crate test;
-
 use test::Bencher;
 
 use livesplit_core::run::parser::livesplit;
diff --git a/capi/Cargo.toml b/capi/Cargo.toml
index 3fc1aea..5ee319f 100644
--- a/capi/Cargo.toml
+++ b/capi/Cargo.toml
@@ -2,6 +2,7 @@
 name = "livesplit-core-capi"
 version = "0.10.0"
 authors = ["Christopher Serr <christopher.serr@gmail.com>"]
+edition = "2018"
 
 [dependencies]
 livesplit-core = { path = "..", default-features = false }
diff --git a/capi/bind_gen/Cargo.toml b/capi/bind_gen/Cargo.toml
index e5f378d..7a57f5d 100644
--- a/capi/bind_gen/Cargo.toml
+++ b/capi/bind_gen/Cargo.toml
@@ -2,6 +2,7 @@
 authors = ["Christopher Serr <christopher.serr@gmail.com>"]
 name = "bindings"
 version = "0.1.0"
+edition = "2018"
 
 [dependencies]
 heck = "0.3.0"
diff --git a/capi/bind_gen/src/c.rs b/capi/bind_gen/src/c.rs
index d4d1c75..dd22890 100644
--- a/capi/bind_gen/src/c.rs
+++ b/capi/bind_gen/src/c.rs
@@ -1,9 +1,9 @@
 use std::borrow::Cow;
 use std::collections::BTreeMap;
 use std::io::{Result, Write};
-use {Class, Type, TypeKind};
+use crate::{Class, Type, TypeKind};
 
-fn get_type(ty: &Type) -> Cow<str> {
+fn get_type(ty: &Type) -> Cow<'_, str> {
     let mut name = Cow::Borrowed(match ty.name.as_str() {
         "i8" => "int8_t",
         "i16" => "int16_t",
@@ -115,7 +115,7 @@ already been freed.
                 function.name
             )?;
 
-            for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+            for (i, (name, typ)) in function.inputs.iter().enumerate() {
                 if i != 0 {
                     write!(writer, ", ")?;
                 }
diff --git a/capi/bind_gen/src/csharp.rs b/capi/bind_gen/src/csharp.rs
index 3de6429..c91cd44 100644
--- a/capi/bind_gen/src/csharp.rs
+++ b/capi/bind_gen/src/csharp.rs
@@ -1,7 +1,7 @@
 use heck::{CamelCase, MixedCase};
 use std::collections::BTreeMap;
 use std::io::{Result, Write};
-use {Class, Function, Type, TypeKind};
+use crate::{Class, Function, Type, TypeKind};
 
 fn get_hl_type(ty: &Type) -> String {
     if ty.is_custom {
@@ -21,11 +21,13 @@ fn get_hl_type(ty: &Type) -> String {
 
 fn get_ll_type(ty: &Type, output: bool) -> &str {
     match (ty.kind, ty.name.as_str()) {
-        (TypeKind::Ref, "c_char") => if output {
-            "LSCoreString"
-        } else {
-            "string"
-        },
+        (TypeKind::Ref, "c_char") => {
+            if output {
+                "LSCoreString"
+            } else {
+                "string"
+            }
+        }
         (TypeKind::Ref, _) | (TypeKind::RefMut, _) => "IntPtr",
         (_, t) if !ty.is_custom => match t {
             "i8" => "sbyte",
@@ -39,18 +41,22 @@ fn get_ll_type(ty: &Type, output: bool) -> &str {
             "usize" => "UIntPtr",
             "f32" => "float",
             "f64" => "double",
-            "bool" => if output {
-                "byte"
-            } else {
-                "bool"
-            },
+            "bool" => {
+                if output {
+                    "byte"
+                } else {
+                    "bool"
+                }
+            }
             "()" => "void",
             "c_char" => "char",
-            "Json" => if output {
-                "LSCoreString"
-            } else {
-                "string"
-            },
+            "Json" => {
+                if output {
+                    "LSCoreString"
+                } else {
+                    "string"
+                }
+            }
             x => x,
         },
         _ => "IntPtr",
@@ -134,7 +140,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, class_name: &str) -> R
         )?;
     }
 
-    for (i, &(ref name, ref typ)) in function
+    for (i, (name, typ)) in function
         .inputs
         .iter()
         .skip(if is_static { 0 } else { 1 })
@@ -162,7 +168,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, class_name: &str) -> R
         )?;
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom {
             write!(
                 writer,
@@ -191,7 +197,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, class_name: &str) -> R
 
     write!(writer, r#"LiveSplitCoreNative.{}("#, &function.name)?;
 
-    for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+    for (i, (name, typ)) in function.inputs.iter().enumerate() {
         if i != 0 {
             write!(writer, ", ")?;
         }
@@ -229,7 +235,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, class_name: &str) -> R
 
     write!(writer, r#";"#)?;
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom && typ.kind == TypeKind::Value {
             write!(
                 writer,
@@ -461,7 +467,7 @@ namespace LiveSplitCore
                 &function.name
             )?;
 
-            for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+            for (i, (name, typ)) in function.inputs.iter().enumerate() {
                 if i != 0 {
                     write!(writer, ", ")?;
                 }
diff --git a/capi/bind_gen/src/emscripten.rs b/capi/bind_gen/src/emscripten.rs
index 1da6860..745c9c3 100644
--- a/capi/bind_gen/src/emscripten.rs
+++ b/capi/bind_gen/src/emscripten.rs
@@ -1,7 +1,7 @@
+use crate::{typescript, Class, Function, Type, TypeKind};
 use heck::MixedCase;
 use std::collections::BTreeMap;
 use std::io::{Result, Write};
-use {typescript, Class, Function, Type, TypeKind};
 
 fn get_hl_type_with_null(ty: &Type) -> String {
     let mut formatted = get_hl_type_without_null(ty);
@@ -40,7 +40,8 @@ fn get_hl_type_without_null(ty: &Type) -> String {
                 x => x,
             },
             _ => unreachable!(),
-        }.to_string()
+        }
+        .to_string()
     }
 }
 
@@ -115,7 +116,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
     }
 
     if !type_script {
-        for &(ref name, ref ty) in function.inputs.iter().skip(if is_static { 0 } else { 1 }) {
+        for (name, ty) in function.inputs.iter().skip(if is_static { 0 } else { 1 }) {
             write!(
                 writer,
                 r#"
@@ -149,7 +150,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
         method
     )?;
 
-    for (i, &(ref name, ref ty)) in function
+    for (i, (name, ty)) in function
         .inputs
         .iter()
         .skip(if is_static { 0 } else { 1 })
@@ -179,7 +180,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
         )?;
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom {
             write!(
                 writer,
@@ -206,7 +207,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
 
     write!(writer, r#"liveSplitCoreNative.{}("#, &function.name)?;
 
-    for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+    for (i, (name, typ)) in function.inputs.iter().enumerate() {
         if i != 0 {
             write!(writer, ", ")?;
         }
@@ -244,7 +245,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
 
     write!(writer, r#";"#)?;
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom && typ.kind == TypeKind::Value {
             write!(
                 writer,
@@ -331,7 +332,7 @@ const liveSplitCoreNative = {};"#
                 get_ll_type(&function.output)
             )?;
 
-            for (i, &(_, ref typ)) in function.inputs.iter().enumerate() {
+            for (i, (_, typ)) in function.inputs.iter().enumerate() {
                 if i != 0 {
                     write!(writer, ", ")?;
                 }
diff --git a/capi/bind_gen/src/java/jna.rs b/capi/bind_gen/src/java/jna.rs
index 4e8b826..a36f72d 100644
--- a/capi/bind_gen/src/java/jna.rs
+++ b/capi/bind_gen/src/java/jna.rs
@@ -4,7 +4,7 @@ use std::collections::BTreeMap;
 use std::fs::File;
 use std::io::{BufWriter, Result, Write};
 use std::path::Path;
-use {Class, Function, Type, TypeKind};
+use crate::{Class, Function, Type, TypeKind};
 
 fn get_hl_type(ty: &Type) -> String {
     if ty.is_custom {
@@ -111,7 +111,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, class_name: &str) -> R
         )?;
     }
 
-    for (i, &(ref name, ref typ)) in function
+    for (i, (name, typ)) in function
         .inputs
         .iter()
         .skip(if is_static { 0 } else { 1 })
@@ -138,7 +138,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, class_name: &str) -> R
         )?;
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom {
             write!(
                 writer,
@@ -171,7 +171,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, class_name: &str) -> R
         &function.name
     )?;
 
-    for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+    for (i, (name, typ)) in function.inputs.iter().enumerate() {
         if i != 0 {
             write!(writer, ", ")?;
         }
@@ -212,7 +212,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, class_name: &str) -> R
 
     write!(writer, r#";"#)?;
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom && typ.kind == TypeKind::Value {
             write!(
                 writer,
@@ -456,7 +456,7 @@ public interface LiveSplitCoreNative extends Library {
                 function.name
             )?;
 
-            for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+            for (i, (name, typ)) in function.inputs.iter().enumerate() {
                 if i != 0 {
                     write!(writer, ", ")?;
                 }
diff --git a/capi/bind_gen/src/java/jni.rs b/capi/bind_gen/src/java/jni.rs
index bee4605..76cce67 100644
--- a/capi/bind_gen/src/java/jni.rs
+++ b/capi/bind_gen/src/java/jni.rs
@@ -1,10 +1,10 @@
 use super::write_class_comments;
+use crate::{Class, Function, Type, TypeKind};
 use heck::MixedCase;
 use std::collections::BTreeMap;
 use std::fs::File;
 use std::io::{BufWriter, Result, Write};
 use std::path::Path;
-use {Class, Function, Type, TypeKind};
 
 fn get_hl_type(ty: &Type) -> String {
     if ty.is_custom {
@@ -108,7 +108,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, class_name: &str) -> R
         )?;
     }
 
-    for (i, &(ref name, ref typ)) in function
+    for (i, (name, typ)) in function
         .inputs
         .iter()
         .skip(if is_static { 0 } else { 1 })
@@ -135,7 +135,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, class_name: &str) -> R
         )?;
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom {
             write!(
                 writer,
@@ -169,7 +169,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, class_name: &str) -> R
         function.method.to_mixed_case()
     )?;
 
-    for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+    for (i, (name, typ)) in function.inputs.iter().enumerate() {
         if i != 0 {
             write!(writer, ", ")?;
         }
@@ -194,7 +194,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, class_name: &str) -> R
 
     write!(writer, r#";"#)?;
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom && typ.kind == TypeKind::Value {
             write!(
                 writer,
@@ -427,7 +427,7 @@ public class LiveSplitCoreNative {
                 function.method.to_mixed_case()
             )?;
 
-            for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+            for (i, (name, typ)) in function.inputs.iter().enumerate() {
                 if i != 0 {
                     write!(writer, ", ")?;
                 }
diff --git a/capi/bind_gen/src/java/mod.rs b/capi/bind_gen/src/java/mod.rs
index 9508f96..67a393c 100644
--- a/capi/bind_gen/src/java/mod.rs
+++ b/capi/bind_gen/src/java/mod.rs
@@ -1,9 +1,9 @@
-use jni_cpp;
+use crate::jni_cpp;
 use std::collections::BTreeMap;
 use std::fs::{create_dir_all, File};
 use std::io::{BufWriter, Write};
 use std::path::Path;
-use {Class, Result};
+use crate::{Class, Result};
 
 mod jna;
 mod jni;
diff --git a/capi/bind_gen/src/jni_cpp.rs b/capi/bind_gen/src/jni_cpp.rs
index 3fd74fc..5aed31c 100644
--- a/capi/bind_gen/src/jni_cpp.rs
+++ b/capi/bind_gen/src/jni_cpp.rs
@@ -1,10 +1,10 @@
+use crate::{Class, Function, Type, TypeKind};
 use heck::MixedCase;
 use std::borrow::Cow;
 use std::collections::BTreeMap;
 use std::io::{Result, Write};
-use {Class, Function, Type, TypeKind};
 
-fn get_c_type(ty: &Type) -> Cow<str> {
+fn get_c_type(ty: &Type) -> Cow<'_, str> {
     let mut name = Cow::Borrowed(match ty.name.as_str() {
         "i8" => "int8_t",
         "i16" => "int16_t",
@@ -36,7 +36,7 @@ fn get_c_type(ty: &Type) -> Cow<str> {
     name
 }
 
-fn get_jni_type<'a>(ty: &'a Type) -> &'a str {
+fn get_jni_type(ty: &Type) -> &str {
     match (ty.kind, ty.name.as_str()) {
         (TypeKind::Ref, "c_char") => "jstring",
         (TypeKind::Ref, _) | (TypeKind::RefMut, _) => "jlong",
@@ -75,7 +75,7 @@ extern "C" JNIEXPORT {} Java_livesplitcore_LiveSplitCoreNative_{}_1{}(JNIEnv* jn
         function.method.to_mixed_case()
     )?;
 
-    for &(ref name, ref typ) in &function.inputs {
+    for (name, typ) in &function.inputs {
         write!(
             writer,
             ", {} {}",
@@ -90,7 +90,7 @@ extern "C" JNIEXPORT {} Java_livesplitcore_LiveSplitCoreNative_{}_1{}(JNIEnv* jn
     "#
     )?;
 
-    for &(ref name, ref typ) in &function.inputs {
+    for (name, typ) in &function.inputs {
         let jni_type = get_jni_type(typ);
         if jni_type == "jstring" {
             write!(
@@ -112,7 +112,7 @@ extern "C" JNIEXPORT {} Java_livesplitcore_LiveSplitCoreNative_{}_1{}(JNIEnv* jn
 
     write!(writer, r#"{}("#, &function.name)?;
 
-    for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+    for (i, (name, typ)) in function.inputs.iter().enumerate() {
         if i != 0 {
             write!(writer, ", ")?;
         }
@@ -139,7 +139,7 @@ extern "C" JNIEXPORT {} Java_livesplitcore_LiveSplitCoreNative_{}_1{}(JNIEnv* jn
 
     write!(writer, r#";"#)?;
 
-    for &(ref name, ref typ) in &function.inputs {
+    for (name, typ) in &function.inputs {
         let jni_type = get_jni_type(typ);
         if jni_type == "jstring" {
             write!(
diff --git a/capi/bind_gen/src/kotlin/jni.rs b/capi/bind_gen/src/kotlin/jni.rs
index 22f180b..60dec33 100644
--- a/capi/bind_gen/src/kotlin/jni.rs
+++ b/capi/bind_gen/src/kotlin/jni.rs
@@ -1,9 +1,9 @@
+use crate::{Class, Function, Type, TypeKind};
 use heck::MixedCase;
 use std::collections::BTreeMap;
 use std::fs::File;
 use std::io::{BufWriter, Result, Write};
 use std::path::Path;
-use {Class, Function, Type, TypeKind};
 
 fn get_hl_type(ty: &Type) -> String {
     if ty.is_custom {
@@ -130,7 +130,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         )?;
     }
 
-    for (i, &(ref name, ref typ)) in function
+    for (i, (name, typ)) in function
         .inputs
         .iter()
         .skip(if is_static { 0 } else { 1 })
@@ -166,7 +166,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         )?;
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom {
             write!(
                 writer,
@@ -200,7 +200,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         function.method.to_mixed_case()
     )?;
 
-    for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+    for (i, (name, typ)) in function.inputs.iter().enumerate() {
         if i != 0 {
             write!(writer, ", ")?;
         }
@@ -223,7 +223,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         write!(writer, r#")"#)?;
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom && typ.kind == TypeKind::Value {
             write!(
                 writer,
@@ -472,7 +472,7 @@ object LiveSplitCoreNative {
                 function.method.to_mixed_case()
             )?;
 
-            for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+            for (i, (name, typ)) in function.inputs.iter().enumerate() {
                 if i != 0 {
                     write!(writer, ", ")?;
                 }
diff --git a/capi/bind_gen/src/kotlin/mod.rs b/capi/bind_gen/src/kotlin/mod.rs
index 8284860..8801659 100644
--- a/capi/bind_gen/src/kotlin/mod.rs
+++ b/capi/bind_gen/src/kotlin/mod.rs
@@ -1,9 +1,9 @@
-use jni_cpp;
+use crate::jni_cpp;
 use std::collections::BTreeMap;
 use std::fs::{create_dir_all, File};
 use std::io::BufWriter;
 use std::path::Path;
-use {Class, Result};
+use crate::{Class, Result};
 
 mod jni;
 
diff --git a/capi/bind_gen/src/main.rs b/capi/bind_gen/src/main.rs
index 8c30f87..7f0ad47 100644
--- a/capi/bind_gen/src/main.rs
+++ b/capi/bind_gen/src/main.rs
@@ -1,7 +1,4 @@
-extern crate heck;
-extern crate structopt;
-extern crate structopt_derive;
-extern crate syn;
+use structopt;
 
 mod c;
 mod csharp;
@@ -64,7 +61,7 @@ pub struct Function {
 
 impl Function {
     fn is_static(&self) -> bool {
-        if let Some(&(ref name, _)) = self.inputs.get(0) {
+        if let Some((name, _)) = self.inputs.get(0) {
             name != "this"
         } else {
             true
@@ -86,8 +83,8 @@ pub struct Class {
 }
 
 fn get_type(ty: &SynType) -> Type {
-    match *ty {
-        SynType::Reference(ref reference) => {
+    match ty {
+        SynType::Reference(reference) => {
             let mut ty = get_type(&reference.elem);
             ty.kind = if reference.mutability.is_some() {
                 TypeKind::RefMut
@@ -96,7 +93,7 @@ fn get_type(ty: &SynType) -> Type {
             };
             ty
         }
-        SynType::Ptr(ref ptr) => {
+        SynType::Ptr(ptr) => {
             let mut ty = get_type(&ptr.elem);
             ty.kind = if ptr.mutability.is_some() {
                 TypeKind::RefMut
@@ -105,7 +102,7 @@ fn get_type(ty: &SynType) -> Type {
             };
             ty
         }
-        SynType::Path(ref path) => {
+        SynType::Path(path) => {
             if let Some(segment) = path.path.segments.iter().last() {
                 let mut name = segment.ident.to_string();
                 let is_nullable = if name.starts_with("Nullable") {
@@ -156,7 +153,7 @@ fn main() {
     let mut functions = Vec::new();
 
     for item in &file.items {
-        if let &Item::Mod(ref module) = item {
+        if let Item::Mod(module) = item {
             contents.clear();
             File::open(format!("../src/{}.rs", module.ident))
                 .unwrap()
@@ -170,22 +167,24 @@ fn main() {
                     .filter_map(|a| match a.interpret_meta() {
                         Some(Meta::NameValue(v)) => Some(v),
                         _ => None,
-                    }).filter(|m| m.ident.to_string() == "doc")
+                    })
+                    .filter(|m| m.ident.to_string() == "doc")
                     .filter_map(|m| match m.lit {
                         Lit::Str(s) => Some(s.value().trim().to_string()),
                         _ => None,
-                    }).collect::<Vec<_>>(),
+                    })
+                    .collect::<Vec<_>>(),
             );
 
             for item in &file.items {
                 if let &Item::Fn(ItemFn {
                     vis: Visibility::Public(_),
-                    ref abi,
-                    ref attrs,
-                    ref decl,
-                    ref ident,
+                    abi,
+                    attrs,
+                    decl,
+                    ident,
                     ..
-                }) = item
+                }) = &item
                 {
                     if abi
                         .as_ref()
@@ -197,20 +196,23 @@ fn main() {
                             .filter_map(|m| match m {
                                 Meta::Word(w) => Some(w),
                                 _ => None,
-                            }).any(|w| w.to_string() == "no_mangle")
+                            })
+                            .any(|w| w.to_string() == "no_mangle")
                     {
                         let comments = attrs
                             .iter()
                             .filter_map(|a| match a.interpret_meta() {
                                 Some(Meta::NameValue(v)) => Some(v),
                                 _ => None,
-                            }).filter(|m| m.ident.to_string() == "doc")
+                            })
+                            .filter(|m| m.ident.to_string() == "doc")
                             .filter_map(|m| match m.lit {
                                 Lit::Str(s) => Some(s.value().trim().to_string()),
                                 _ => None,
-                            }).collect();
+                            })
+                            .collect();
 
-                        let output = if let ReturnType::Type(_, ref ty) = decl.output {
+                        let output = if let ReturnType::Type(_, ty) = &decl.output {
                             get_type(ty)
                         } else {
                             Type {
@@ -226,16 +228,17 @@ fn main() {
                             .iter()
                             .map(|i| {
                                 let c = match i {
-                                    &FnArg::Captured(ref c) => c,
+                                    FnArg::Captured(c) => c,
                                     _ => panic!("Found a weird fn argument"),
                                 };
-                                let name = if let Pat::Ident(ref ident) = c.pat {
+                                let name = if let Pat::Ident(ident) = &c.pat {
                                     ident.ident.to_string()
                                 } else {
                                     String::from("parameter")
                                 };
                                 (name, get_type(&c.ty))
-                            }).collect();
+                            })
+                            .collect();
 
                         let name = ident.to_string();
                         let class;
@@ -276,7 +279,7 @@ fn fns_to_classes(functions: Vec<Function>) -> BTreeMap<String, Class> {
 
         class.comments = function.class_comments.clone();
 
-        let kind = if let Some(&(ref name, ref ty)) = function.inputs.get(0) {
+        let kind = if let Some((name, ty)) = function.inputs.get(0) {
             if name == "this" {
                 Some(ty.kind)
             } else {
diff --git a/capi/bind_gen/src/node.rs b/capi/bind_gen/src/node.rs
index e9b5838..5c2158c 100644
--- a/capi/bind_gen/src/node.rs
+++ b/capi/bind_gen/src/node.rs
@@ -1,7 +1,7 @@
+use crate::{typescript, Class, Function, Type, TypeKind};
 use heck::MixedCase;
 use std::collections::BTreeMap;
 use std::io::{Result, Write};
-use {typescript, Class, Function, Type, TypeKind};
 
 fn get_hl_type_with_null(ty: &Type) -> String {
     let mut formatted = get_hl_type_without_null(ty);
@@ -41,7 +41,8 @@ fn get_hl_type_without_null(ty: &Type) -> String {
                 x => x,
             },
             _ => unreachable!(),
-        }.to_string()
+        }
+        .to_string()
     }
 }
 
@@ -133,7 +134,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
     }
 
     if !type_script {
-        for &(ref name, ref ty) in function.inputs.iter().skip(if is_static { 0 } else { 1 }) {
+        for (name, ty) in function.inputs.iter().skip(if is_static { 0 } else { 1 }) {
             write!(
                 writer,
                 r#"
@@ -167,7 +168,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
         method
     )?;
 
-    for (i, &(ref name, ref ty)) in function
+    for (i, (name, ty)) in function
         .inputs
         .iter()
         .skip(if is_static { 0 } else { 1 })
@@ -197,7 +198,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
         )?;
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom {
             write!(
                 writer,
@@ -224,7 +225,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
 
     write!(writer, r#"liveSplitCoreNative.{}("#, &function.name)?;
 
-    for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+    for (i, (name, typ)) in function.inputs.iter().enumerate() {
         if i != 0 {
             write!(writer, ", ")?;
         }
@@ -251,7 +252,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
 
     write!(writer, r#";"#)?;
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom && typ.kind == TypeKind::Value {
             write!(
                 writer,
@@ -344,7 +345,7 @@ const liveSplitCoreNative = ffi.Library('livesplit_core', {"#
                 get_ll_type(&function.output)
             )?;
 
-            for (i, &(_, ref typ)) in function.inputs.iter().enumerate() {
+            for (i, (_, typ)) in function.inputs.iter().enumerate() {
                 if i != 0 {
                     write!(writer, ", ")?;
                 }
diff --git a/capi/bind_gen/src/python.rs b/capi/bind_gen/src/python.rs
index 936f4cf..dcc2c7c 100644
--- a/capi/bind_gen/src/python.rs
+++ b/capi/bind_gen/src/python.rs
@@ -1,6 +1,6 @@
+use crate::{Class, Function, Type, TypeKind};
 use std::collections::BTreeMap;
 use std::io::{Result, Write};
-use {Class, Function, Type, TypeKind};
 
 fn get_hl_type(ty: &Type) -> String {
     if ty.is_custom {
@@ -96,7 +96,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         )?;
     }
 
-    for (i, &(ref name, _)) in function.inputs.iter().enumerate() {
+    for (i, (name, _)) in function.inputs.iter().enumerate() {
         if i != 0 {
             write!(writer, ", ")?;
         }
@@ -129,7 +129,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         "#
     )?;
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom {
             write!(
                 writer,
@@ -151,7 +151,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
 
     write!(writer, r#"livesplit_core_native.{}("#, &function.name)?;
 
-    for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+    for (i, (name, typ)) in function.inputs.iter().enumerate() {
         if i != 0 {
             write!(writer, ", ")?;
         }
@@ -180,7 +180,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         }
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom && typ.kind == TypeKind::Value {
             write!(
                 writer,
@@ -245,7 +245,7 @@ livesplit_core_native.{}.argtypes = ("#,
                 function.name
             )?;
 
-            for &(_, ref typ) in &function.inputs {
+            for (_, typ) in &function.inputs {
                 write!(writer, "{}, ", get_ll_type(typ))?;
             }
 
diff --git a/capi/bind_gen/src/ruby.rs b/capi/bind_gen/src/ruby.rs
index 475c402..f7c1c5a 100644
--- a/capi/bind_gen/src/ruby.rs
+++ b/capi/bind_gen/src/ruby.rs
@@ -1,6 +1,6 @@
+use crate::{Class, Function, Opt, Type, TypeKind};
 use std::collections::BTreeMap;
 use std::io::{Result, Write};
-use {Class, Function, Opt, Type, TypeKind};
 
 fn get_hl_type(ty: &Type) -> String {
     if ty.is_custom {
@@ -32,7 +32,8 @@ fn get_hl_type(ty: &Type) -> String {
                 x => x,
             },
             _ => "Object",
-        }.to_string()
+        }
+        .to_string()
     }
 }
 
@@ -113,7 +114,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         )?;
     }
 
-    for &(ref name, ref typ) in function.inputs.iter().skip(if is_static { 0 } else { 1 }) {
+    for (name, typ) in function.inputs.iter().skip(if is_static { 0 } else { 1 }) {
         write!(
             writer,
             r"
@@ -146,7 +147,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         method
     )?;
 
-    for (i, &(ref name, _)) in function
+    for (i, (name, _)) in function
         .inputs
         .iter()
         .skip(if is_static { 0 } else { 1 })
@@ -164,7 +165,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
             "#
     )?;
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom {
             write!(
                 writer,
@@ -188,7 +189,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
 
     write!(writer, r#"Native.{}("#, &function.name)?;
 
-    for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+    for (i, (name, typ)) in function.inputs.iter().enumerate() {
         if i != 0 {
             write!(writer, ", ")?;
         }
@@ -211,7 +212,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         write!(writer, r#")"#)?;
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom && typ.kind == TypeKind::Value {
             write!(
                 writer,
@@ -277,7 +278,7 @@ module LiveSplitCore
                 function.name
             )?;
 
-            for (i, &(_, ref typ)) in function.inputs.iter().enumerate() {
+            for (i, (_, typ)) in function.inputs.iter().enumerate() {
                 if i != 0 {
                     write!(writer, ", ")?;
                 }
diff --git a/capi/bind_gen/src/swift/code.rs b/capi/bind_gen/src/swift/code.rs
index fc25001..9a2e764 100644
--- a/capi/bind_gen/src/swift/code.rs
+++ b/capi/bind_gen/src/swift/code.rs
@@ -1,7 +1,7 @@
+use crate::{Class, Function, Type, TypeKind};
 use heck::MixedCase;
 use std::collections::BTreeMap;
 use std::io::{Result, Write};
-use {Class, Function, Type, TypeKind};
 
 fn get_hl_type(ty: &Type) -> String {
     if ty.is_custom {
@@ -120,7 +120,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         )?;
     }
 
-    for (i, &(ref name, ref typ)) in function
+    for (i, (name, typ)) in function
         .inputs
         .iter()
         .skip(if is_static { 0 } else { 1 })
@@ -159,7 +159,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         )?;
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom {
             write!(
                 writer,
@@ -184,7 +184,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
 
     write!(writer, r#"LiveSplitCoreNative.{}("#, &function.name)?;
 
-    for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+    for (i, (name, typ)) in function.inputs.iter().enumerate() {
         if i != 0 {
             write!(writer, ", ")?;
         }
@@ -214,7 +214,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function) -> Result<()> {
         write!(writer, r#")"#)?;
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom && typ.kind == TypeKind::Value {
             write!(
                 writer,
diff --git a/capi/bind_gen/src/swift/header.rs b/capi/bind_gen/src/swift/header.rs
index b28c0ff..f760100 100644
--- a/capi/bind_gen/src/swift/header.rs
+++ b/capi/bind_gen/src/swift/header.rs
@@ -1,9 +1,9 @@
+use crate::{Class, Type, TypeKind};
 use std::borrow::Cow;
 use std::collections::BTreeMap;
 use std::io::{Result, Write};
-use {Class, Type, TypeKind};
 
-fn get_type(ty: &Type) -> Cow<str> {
+fn get_type(ty: &Type) -> Cow<'_, str> {
     let mut name = Cow::Borrowed(match ty.name.as_str() {
         "i8" => "int8_t",
         "i16" => "int16_t",
@@ -24,11 +24,13 @@ fn get_type(ty: &Type) -> Cow<str> {
     });
     match (ty.is_custom, ty.kind) {
         (false, TypeKind::RefMut) => name.to_mut().push_str("*"),
-        (false, TypeKind::Ref) => if name == "char" {
-            name.to_mut().push_str(" const*")
-        } else {
-            name.to_mut().push_str("*")
-        },
+        (false, TypeKind::Ref) => {
+            if name == "char" {
+                name.to_mut().push_str(" const*")
+            } else {
+                name.to_mut().push_str("*")
+            }
+        }
         (true, TypeKind::Ref) => name = Cow::Borrowed("void*"),
         (true, _) => name = Cow::Borrowed("void*"),
         _ => (),
@@ -74,7 +76,7 @@ extern "C" {
                 function.name
             )?;
 
-            for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+            for (i, (name, typ)) in function.inputs.iter().enumerate() {
                 if i != 0 {
                     write!(writer, ", ")?;
                 }
diff --git a/capi/bind_gen/src/swift/mod.rs b/capi/bind_gen/src/swift/mod.rs
index bd4465e..d8cbd79 100644
--- a/capi/bind_gen/src/swift/mod.rs
+++ b/capi/bind_gen/src/swift/mod.rs
@@ -2,7 +2,7 @@ use std::collections::BTreeMap;
 use std::fs::{create_dir_all, File};
 use std::io::{BufWriter, Write};
 use std::path::Path;
-use {Class, Result};
+use crate::{Class, Result};
 
 mod code;
 mod header;
diff --git a/capi/bind_gen/src/wasm.rs b/capi/bind_gen/src/wasm.rs
index c1cd136..9622a60 100644
--- a/capi/bind_gen/src/wasm.rs
+++ b/capi/bind_gen/src/wasm.rs
@@ -1,7 +1,7 @@
+use crate::{typescript, Class, Function, Type, TypeKind};
 use heck::MixedCase;
 use std::collections::BTreeMap;
 use std::io::{Result, Write};
-use {typescript, Class, Function, Type, TypeKind};
 
 fn get_hl_type_with_null(ty: &Type) -> String {
     let mut formatted = get_hl_type_without_null(ty);
@@ -40,7 +40,8 @@ fn get_hl_type_without_null(ty: &Type) -> String {
                 x => x,
             },
             _ => unreachable!(),
-        }.to_string()
+        }
+        .to_string()
     }
 }
 
@@ -107,7 +108,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
     }
 
     if !type_script {
-        for &(ref name, ref ty) in function.inputs.iter().skip(if is_static { 0 } else { 1 }) {
+        for (name, ty) in function.inputs.iter().skip(if is_static { 0 } else { 1 }) {
             write!(
                 writer,
                 r#"
@@ -141,7 +142,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
         method
     )?;
 
-    for (i, &(ref name, ref ty)) in function
+    for (i, (name, ty)) in function
         .inputs
         .iter()
         .skip(if is_static { 0 } else { 1 })
@@ -171,7 +172,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
         )?;
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom {
             write!(
                 writer,
@@ -184,7 +185,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
         }
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         let hl_type = get_hl_type_without_null(typ);
         if hl_type == "string" {
             write!(
@@ -217,7 +218,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
 
     write!(writer, r#"instance().exports.{}("#, &function.name)?;
 
-    for (i, &(ref name, ref typ)) in function.inputs.iter().enumerate() {
+    for (i, (name, typ)) in function.inputs.iter().enumerate() {
         let type_name = get_hl_type_without_null(typ);
         if i != 0 {
             write!(writer, ", ")?;
@@ -256,7 +257,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
 
     write!(writer, r#";"#)?;
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         let hl_type = get_hl_type_without_null(typ);
         if hl_type == "string" || typ.name == "Json" {
             write!(
@@ -268,7 +269,7 @@ fn write_fn<W: Write>(mut writer: W, function: &Function, type_script: bool) ->
         }
     }
 
-    for &(ref name, ref typ) in function.inputs.iter() {
+    for (name, typ) in function.inputs.iter() {
         if typ.is_custom && typ.kind == TypeKind::Value {
             write!(
                 writer,
diff --git a/capi/cdylib/Cargo.toml b/capi/cdylib/Cargo.toml
index 13550a3..9476c60 100644
--- a/capi/cdylib/Cargo.toml
+++ b/capi/cdylib/Cargo.toml
@@ -2,6 +2,7 @@
 name = "cdylib"
 version = "0.1.0"
 authors = ["Christopher Serr <christopher.serr@gmail.com>"]
+edition = "2018"
 
 [dependencies]
 livesplit-core-capi = { path = "..", default-features = false }
diff --git a/capi/js/Cargo.toml b/capi/js/Cargo.toml
index 7672cbd..5cb0d3e 100644
--- a/capi/js/Cargo.toml
+++ b/capi/js/Cargo.toml
@@ -2,6 +2,7 @@
 name = "livesplit"
 version = "0.1.0"
 authors = ["Christopher Serr <christopher.serr@gmail.com>"]
+edition = "2018"
 
 [dependencies]
 livesplit-core-capi = { path = "..", default-features = false }
diff --git a/capi/src/atomic_date_time.rs b/capi/src/atomic_date_time.rs
index ff63c2a..f38b066 100644
--- a/capi/src/atomic_date_time.rs
+++ b/capi/src/atomic_date_time.rs
@@ -2,7 +2,7 @@
 //! an atomic clock as possible.
 
 use livesplit_core::AtomicDateTime;
-use output_str;
+use crate::output_str;
 use std::os::raw::c_char;
 
 /// type
diff --git a/capi/src/attempt.rs b/capi/src/attempt.rs
index 8d4f803..bc80dc6 100644
--- a/capi/src/attempt.rs
+++ b/capi/src/attempt.rs
@@ -3,10 +3,10 @@
 //! then reset, an Attempt describing general information about it is created.
 
 use super::{output_time, output_time_span};
-use atomic_date_time::NullableOwnedAtomicDateTime;
+use crate::atomic_date_time::NullableOwnedAtomicDateTime;
 use livesplit_core::{Attempt, Time};
 use std::ptr;
-use time_span::NullableTimeSpan;
+use crate::time_span::NullableTimeSpan;
 
 /// type
 pub type OwnedAttempt = Box<Attempt>;
diff --git a/capi/src/blank_space_component.rs b/capi/src/blank_space_component.rs
index f1c46e7..f95e03c 100644
--- a/capi/src/blank_space_component.rs
+++ b/capi/src/blank_space_component.rs
@@ -3,8 +3,8 @@
 //! components.
 
 use super::{output_vec, Json};
-use blank_space_component_state::OwnedBlankSpaceComponentState;
-use component::OwnedComponent;
+use crate::blank_space_component_state::OwnedBlankSpaceComponentState;
+use crate::component::OwnedComponent;
 use livesplit_core::component::blank_space::Component as BlankSpaceComponent;
 use livesplit_core::Timer;
 
diff --git a/capi/src/current_comparison_component.rs b/capi/src/current_comparison_component.rs
index 31f5e91..a33af32 100644
--- a/capi/src/current_comparison_component.rs
+++ b/capi/src/current_comparison_component.rs
@@ -2,8 +2,8 @@
 //! comparison that is currently selected to be compared against.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
-use current_comparison_component_state::OwnedCurrentComparisonComponentState;
+use crate::component::OwnedComponent;
+use crate::current_comparison_component_state::OwnedCurrentComparisonComponentState;
 use livesplit_core::component::current_comparison::Component as CurrentComparisonComponent;
 use livesplit_core::Timer;
 
diff --git a/capi/src/current_pace_component.rs b/capi/src/current_pace_component.rs
index e5ef73d..f9b2d4c 100644
--- a/capi/src/current_pace_component.rs
+++ b/capi/src/current_pace_component.rs
@@ -3,8 +3,8 @@
 //! chosen comparison for the remainder of the run.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
-use current_pace_component_state::OwnedCurrentPaceComponentState;
+use crate::component::OwnedComponent;
+use crate::current_pace_component_state::OwnedCurrentPaceComponentState;
 use livesplit_core::component::current_pace::Component as CurrentPaceComponent;
 use livesplit_core::Timer;
 
diff --git a/capi/src/delta_component.rs b/capi/src/delta_component.rs
index c784ec0..ab5c749 100644
--- a/capi/src/delta_component.rs
+++ b/capi/src/delta_component.rs
@@ -2,8 +2,8 @@
 //! the current attempt is compared to the chosen comparison.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
-use delta_component_state::OwnedDeltaComponentState;
+use crate::component::OwnedComponent;
+use crate::delta_component_state::OwnedDeltaComponentState;
 use livesplit_core::component::delta::Component as DeltaComponent;
 use livesplit_core::{GeneralLayoutSettings, Timer};
 
diff --git a/capi/src/detailed_timer_component.rs b/capi/src/detailed_timer_component.rs
index 8dc0ccb..b2db90d 100644
--- a/capi/src/detailed_timer_component.rs
+++ b/capi/src/detailed_timer_component.rs
@@ -4,8 +4,8 @@
 //! comparisons, the segment icon, and the segment's name, can also be shown.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
-use detailed_timer_component_state::OwnedDetailedTimerComponentState;
+use crate::component::OwnedComponent;
+use crate::detailed_timer_component_state::OwnedDetailedTimerComponentState;
 use livesplit_core::component::detailed_timer::Component as DetailedTimerComponent;
 use livesplit_core::{GeneralLayoutSettings, Timer};
 
diff --git a/capi/src/graph_component.rs b/capi/src/graph_component.rs
index d95d14b..35144f3 100644
--- a/capi/src/graph_component.rs
+++ b/capi/src/graph_component.rs
@@ -3,8 +3,8 @@
 //! individual deltas are shown as points in a graph.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
-use graph_component_state::OwnedGraphComponentState;
+use crate::component::OwnedComponent;
+use crate::graph_component_state::OwnedGraphComponentState;
 use livesplit_core::component::graph::Component as GraphComponent;
 use livesplit_core::{GeneralLayoutSettings, Timer};
 
diff --git a/capi/src/hotkey_config.rs b/capi/src/hotkey_config.rs
index 954cfed..f785dec 100644
--- a/capi/src/hotkey_config.rs
+++ b/capi/src/hotkey_config.rs
@@ -4,7 +4,7 @@
 use super::{output_vec, str, Json};
 use livesplit_core::HotkeyConfig;
 use serde_json;
-use setting_value::OwnedSettingValue;
+use crate::setting_value::OwnedSettingValue;
 use std::io::Cursor;
 
 /// type
diff --git a/capi/src/hotkey_system.rs b/capi/src/hotkey_system.rs
index 6925361..b232853 100644
--- a/capi/src/hotkey_system.rs
+++ b/capi/src/hotkey_system.rs
@@ -4,9 +4,9 @@
 //! out on platforms that don't support hotkeys. You can turn off a Hotkey
 //! System temporarily. By default the Hotkey System is activated.
 
-use hotkey_config::OwnedHotkeyConfig;
+use crate::hotkey_config::OwnedHotkeyConfig;
 use livesplit_core::HotkeySystem;
-use shared_timer::OwnedSharedTimer;
+use crate::shared_timer::OwnedSharedTimer;
 
 /// type
 pub type OwnedHotkeySystem = Box<HotkeySystem>;
diff --git a/capi/src/layout.rs b/capi/src/layout.rs
index 2a70254..d28d6bf 100644
--- a/capi/src/layout.rs
+++ b/capi/src/layout.rs
@@ -2,7 +2,7 @@
 //! variety of information the runner is interested in.
 
 use super::{output_vec, str, Json};
-use component::OwnedComponent;
+use crate::component::OwnedComponent;
 use livesplit_core::layout::LayoutSettings;
 use livesplit_core::{Layout, Timer};
 use std::io::Cursor;
diff --git a/capi/src/layout_editor.rs b/capi/src/layout_editor.rs
index 15936c2..af80171 100644
--- a/capi/src/layout_editor.rs
+++ b/capi/src/layout_editor.rs
@@ -4,10 +4,10 @@
 //! state objects that can be visualized by any kind of User Interface.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
-use layout::OwnedLayout;
+use crate::component::OwnedComponent;
+use crate::layout::OwnedLayout;
 use livesplit_core::{LayoutEditor, Timer};
-use setting_value::OwnedSettingValue;
+use crate::setting_value::OwnedSettingValue;
 
 /// type
 pub type OwnedLayoutEditor = Box<LayoutEditor>;
diff --git a/capi/src/lib.rs b/capi/src/lib.rs
index dec3ee8..14a86f9 100644
--- a/capi/src/lib.rs
+++ b/capi/src/lib.rs
@@ -3,8 +3,8 @@
 
 //! mod
 
-extern crate livesplit_core;
-extern crate serde_json;
+
+use serde_json;
 
 use std::cell::{Cell, RefCell};
 use std::ffi::CStr;
@@ -71,8 +71,8 @@ pub mod total_playtime_component;
 pub mod total_playtime_component_state;
 
 use livesplit_core::{Time, TimeSpan};
-use run_metadata_variable::RunMetadataVariable;
-use segment_history_element::SegmentHistoryElement;
+use crate::run_metadata_variable::RunMetadataVariable;
+use crate::segment_history_element::SegmentHistoryElement;
 
 /// type
 pub type Json = *const c_char;
diff --git a/capi/src/parse_run_result.rs b/capi/src/parse_run_result.rs
index 515196b..1d19266 100644
--- a/capi/src/parse_run_result.rs
+++ b/capi/src/parse_run_result.rs
@@ -6,7 +6,7 @@ use livesplit_core::run::parser::{
     composite::{ParsedRun, Result},
     TimerKind,
 };
-use run::OwnedRun;
+use crate::run::OwnedRun;
 use std::io::Write;
 use std::os::raw::c_char;
 
diff --git a/capi/src/possible_time_save_component.rs b/capi/src/possible_time_save_component.rs
index cf3879e..f5222f2 100644
--- a/capi/src/possible_time_save_component.rs
+++ b/capi/src/possible_time_save_component.rs
@@ -4,10 +4,10 @@
 //! for the remainder of the current attempt.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
+use crate::component::OwnedComponent;
 use livesplit_core::component::possible_time_save::Component as PossibleTimeSaveComponent;
 use livesplit_core::Timer;
-use possible_time_save_component_state::OwnedPossibleTimeSaveComponentState;
+use crate::possible_time_save_component_state::OwnedPossibleTimeSaveComponentState;
 
 /// type
 pub type OwnedPossibleTimeSaveComponent = Box<PossibleTimeSaveComponent>;
diff --git a/capi/src/previous_segment_component.rs b/capi/src/previous_segment_component.rs
index 1c79887..4694722 100644
--- a/capi/src/previous_segment_component.rs
+++ b/capi/src/previous_segment_component.rs
@@ -5,10 +5,10 @@
 //! active time loss whenever the runner is losing time on the current segment.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
+use crate::component::OwnedComponent;
 use livesplit_core::component::previous_segment::Component as PreviousSegmentComponent;
 use livesplit_core::{GeneralLayoutSettings, Timer};
-use previous_segment_component_state::OwnedPreviousSegmentComponentState;
+use crate::previous_segment_component_state::OwnedPreviousSegmentComponentState;
 
 /// type
 pub type OwnedPreviousSegmentComponent = Box<PreviousSegmentComponent>;
diff --git a/capi/src/run.rs b/capi/src/run.rs
index 184d53a..8f01b6c 100644
--- a/capi/src/run.rs
+++ b/capi/src/run.rs
@@ -3,8 +3,8 @@
 use super::{output_str, output_time_span, output_vec, str};
 use livesplit_core::run::{parser, saver};
 use livesplit_core::{Attempt, Run, RunMetadata, Segment, TimeSpan};
-use parse_run_result::OwnedParseRunResult;
-use segment::OwnedSegment;
+use crate::parse_run_result::OwnedParseRunResult;
+use crate::segment::OwnedSegment;
 use std::fs::File;
 use std::io::{BufReader, Cursor};
 use std::os::raw::c_char;
diff --git a/capi/src/run_editor.rs b/capi/src/run_editor.rs
index 469fb6f..80b02fa 100644
--- a/capi/src/run_editor.rs
+++ b/capi/src/run_editor.rs
@@ -5,10 +5,10 @@
 
 use super::{output_vec, str, Json};
 use livesplit_core::{Run, RunEditor, TimingMethod};
-use run::OwnedRun;
+use crate::run::OwnedRun;
 use std::os::raw::c_char;
 use std::slice;
-use sum_of_best_cleaner::OwnedSumOfBestCleaner;
+use crate::sum_of_best_cleaner::OwnedSumOfBestCleaner;
 
 /// type
 pub type OwnedRunEditor = Box<RunEditor>;
diff --git a/capi/src/run_metadata.rs b/capi/src/run_metadata.rs
index c548e3e..7915dd9 100644
--- a/capi/src/run_metadata.rs
+++ b/capi/src/run_metadata.rs
@@ -3,7 +3,7 @@
 
 use super::output_str;
 use livesplit_core::RunMetadata;
-use run_metadata_variables_iter::OwnedRunMetadataVariablesIter;
+use crate::run_metadata_variables_iter::OwnedRunMetadataVariablesIter;
 use std::os::raw::c_char;
 
 /// type
diff --git a/capi/src/run_metadata_variables_iter.rs b/capi/src/run_metadata_variables_iter.rs
index f2a9680..a519d6e 100644
--- a/capi/src/run_metadata_variables_iter.rs
+++ b/capi/src/run_metadata_variables_iter.rs
@@ -3,7 +3,7 @@
 
 use super::RUN_METADATA_VARIABLE;
 use livesplit_core::indexmap;
-use run_metadata_variable::{NullableRunMetadataVariable, RunMetadataVariable};
+use crate::run_metadata_variable::{NullableRunMetadataVariable, RunMetadataVariable};
 use std::ptr;
 
 /// type
diff --git a/capi/src/segment_history.rs b/capi/src/segment_history.rs
index d49549c..d60227f 100644
--- a/capi/src/segment_history.rs
+++ b/capi/src/segment_history.rs
@@ -4,7 +4,7 @@
 //! artifacts of route changes and similar algorithmic changes.
 
 use livesplit_core::SegmentHistory;
-use segment_history_iter::OwnedSegmentHistoryIter;
+use crate::segment_history_iter::OwnedSegmentHistoryIter;
 
 /// type
 pub type OwnedSegmentHistory = Box<SegmentHistory>;
diff --git a/capi/src/segment_history_iter.rs b/capi/src/segment_history_iter.rs
index 41d551f..ff45a4e 100644
--- a/capi/src/segment_history_iter.rs
+++ b/capi/src/segment_history_iter.rs
@@ -2,7 +2,7 @@
 
 use super::SEGMENT_HISTORY_ELEMENT;
 use livesplit_core::Time;
-use segment_history_element::{NullableSegmentHistoryElement, SegmentHistoryElement};
+use crate::segment_history_element::{NullableSegmentHistoryElement, SegmentHistoryElement};
 use std::{ptr, slice};
 
 /// type
diff --git a/capi/src/separator_component.rs b/capi/src/separator_component.rs
index b3c62e1..edae675 100644
--- a/capi/src/separator_component.rs
+++ b/capi/src/separator_component.rs
@@ -1,7 +1,7 @@
 //! The Separator Component is a simple component that only serves to render
 //! separators between components.
 
-use component::OwnedComponent;
+use crate::component::OwnedComponent;
 use livesplit_core::component::separator::Component as SeparatorComponent;
 
 /// type
diff --git a/capi/src/setting_value.rs b/capi/src/setting_value.rs
index 9554f7f..4fd5ec1 100644
--- a/capi/src/setting_value.rs
+++ b/capi/src/setting_value.rs
@@ -6,7 +6,7 @@ use livesplit_core::settings::{Alignment, Color, Gradient, ListGradient, Value a
 use livesplit_core::timing::formatter::{Accuracy, DigitsFormat};
 use livesplit_core::TimingMethod;
 use std::os::raw::c_char;
-use str;
+use crate::str;
 
 /// type
 pub type OwnedSettingValue = Box<SettingValue>;
diff --git a/capi/src/shared_timer.rs b/capi/src/shared_timer.rs
index 2618dd9..8cf58b3 100644
--- a/capi/src/shared_timer.rs
+++ b/capi/src/shared_timer.rs
@@ -2,9 +2,9 @@
 //! owners.
 
 use livesplit_core::SharedTimer;
-use timer::OwnedTimer;
-use timer_read_lock::OwnedTimerReadLock;
-use timer_write_lock::OwnedTimerWriteLock;
+use crate::timer::OwnedTimer;
+use crate::timer_read_lock::OwnedTimerReadLock;
+use crate::timer_write_lock::OwnedTimerWriteLock;
 
 /// type
 pub type OwnedSharedTimer = Box<SharedTimer>;
diff --git a/capi/src/splits_component.rs b/capi/src/splits_component.rs
index 1074248..7b531ef 100644
--- a/capi/src/splits_component.rs
+++ b/capi/src/splits_component.rs
@@ -5,10 +5,10 @@
 //! to be shown all the time.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
+use crate::component::OwnedComponent;
 use livesplit_core::component::splits::Component as SplitsComponent;
 use livesplit_core::{GeneralLayoutSettings, Timer};
-use splits_component_state::OwnedSplitsComponentState;
+use crate::splits_component_state::OwnedSplitsComponentState;
 
 /// type
 pub type OwnedSplitsComponent = Box<SplitsComponent>;
diff --git a/capi/src/splits_component_state.rs b/capi/src/splits_component_state.rs
index 7401fe9..b4c6f68 100644
--- a/capi/src/splits_component_state.rs
+++ b/capi/src/splits_component_state.rs
@@ -104,7 +104,8 @@ pub extern "C" fn SplitsComponentState_column_semantic_color(
             f,
             "{:?}",
             this.splits[index].columns[column_index].semantic_color
-        ).unwrap()
+        )
+        .unwrap()
     })
 }
 
diff --git a/capi/src/sum_of_best_cleaner.rs b/capi/src/sum_of_best_cleaner.rs
index 924f36a..ae04e32 100644
--- a/capi/src/sum_of_best_cleaner.rs
+++ b/capi/src/sum_of_best_cleaner.rs
@@ -6,7 +6,7 @@
 //! them individually if any of them seem wrong.
 
 use livesplit_core::run::editor::cleaning::SumOfBestCleaner;
-use potential_clean_up::{NullableOwnedPotentialCleanUp, OwnedPotentialCleanUp};
+use crate::potential_clean_up::{NullableOwnedPotentialCleanUp, OwnedPotentialCleanUp};
 
 /// type
 pub type OwnedSumOfBestCleaner = Box<SumOfBestCleaner<'static>>;
diff --git a/capi/src/sum_of_best_component.rs b/capi/src/sum_of_best_component.rs
index 11cf614..44f9790 100644
--- a/capi/src/sum_of_best_component.rs
+++ b/capi/src/sum_of_best_component.rs
@@ -7,10 +7,10 @@
 //! sticks around for historical reasons.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
+use crate::component::OwnedComponent;
 use livesplit_core::component::sum_of_best::Component as SumOfBestComponent;
 use livesplit_core::Timer;
-use sum_of_best_component_state::OwnedSumOfBestComponentState;
+use crate::sum_of_best_component_state::OwnedSumOfBestComponentState;
 
 /// type
 pub type OwnedSumOfBestComponent = Box<SumOfBestComponent>;
diff --git a/capi/src/text_component.rs b/capi/src/text_component.rs
index 588a1c2..de0a8a5 100644
--- a/capi/src/text_component.rs
+++ b/capi/src/text_component.rs
@@ -3,10 +3,10 @@
 //! suitable for a situation where you have a label and a value.
 
 use super::{output_vec, str, Json};
-use component::OwnedComponent;
+use crate::component::OwnedComponent;
 use livesplit_core::component::text::Component as TextComponent;
 use std::os::raw::c_char;
-use text_component_state::OwnedTextComponentState;
+use crate::text_component_state::OwnedTextComponentState;
 
 /// type
 pub type OwnedTextComponent = Box<TextComponent>;
diff --git a/capi/src/text_component_state.rs b/capi/src/text_component_state.rs
index 5f8bec8..04c3dd8 100644
--- a/capi/src/text_component_state.rs
+++ b/capi/src/text_component_state.rs
@@ -18,7 +18,7 @@ pub extern "C" fn TextComponentState_drop(this: OwnedTextComponentState) {
 /// string is returned instead.
 #[no_mangle]
 pub extern "C" fn TextComponentState_left(this: &TextComponentState) -> *const c_char {
-    if let Text::Split(ref left, _) = this.text {
+    if let Text::Split(left, _) = &this.text {
         output_str(left)
     } else {
         output_str("")
@@ -29,7 +29,7 @@ pub extern "C" fn TextComponentState_left(this: &TextComponentState) -> *const c
 /// string is returned instead.
 #[no_mangle]
 pub extern "C" fn TextComponentState_right(this: &TextComponentState) -> *const c_char {
-    if let Text::Split(_, ref right) = this.text {
+    if let Text::Split(_, right) = &this.text {
         output_str(right)
     } else {
         output_str("")
@@ -40,7 +40,7 @@ pub extern "C" fn TextComponentState_right(this: &TextComponentState) -> *const
 /// returned instead.
 #[no_mangle]
 pub extern "C" fn TextComponentState_center(this: &TextComponentState) -> *const c_char {
-    if let Text::Center(ref center) = this.text {
+    if let Text::Center(center) = &this.text {
         output_str(center)
     } else {
         output_str("")
diff --git a/capi/src/time.rs b/capi/src/time.rs
index 643c2d9..cdc57b4 100644
--- a/capi/src/time.rs
+++ b/capi/src/time.rs
@@ -3,7 +3,7 @@
 
 use livesplit_core::{Time, TimingMethod};
 use std::ptr;
-use time_span::NullableTimeSpan;
+use crate::time_span::NullableTimeSpan;
 
 /// type
 pub type OwnedTime = Box<Time>;
diff --git a/capi/src/timer.rs b/capi/src/timer.rs
index 4c9d6e0..96334b3 100644
--- a/capi/src/timer.rs
+++ b/capi/src/timer.rs
@@ -3,8 +3,8 @@
 use super::{output_str, output_time, output_time_span, output_vec};
 use livesplit_core::run::saver;
 use livesplit_core::{Run, Time, TimeSpan, Timer, TimerPhase, TimingMethod};
-use run::{NullableOwnedRun, OwnedRun};
-use shared_timer::OwnedSharedTimer;
+use crate::run::{NullableOwnedRun, OwnedRun};
+use crate::shared_timer::OwnedSharedTimer;
 use std::os::raw::c_char;
 use std::ptr;
 
diff --git a/capi/src/timer_component.rs b/capi/src/timer_component.rs
index f9f4387..e007114 100644
--- a/capi/src/timer_component.rs
+++ b/capi/src/timer_component.rs
@@ -3,10 +3,10 @@
 //! well the current attempt is doing compared to the chosen comparison.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
+use crate::component::OwnedComponent;
 use livesplit_core::component::timer::Component as TimerComponent;
 use livesplit_core::{GeneralLayoutSettings, Timer};
-use timer_component_state::OwnedTimerComponentState;
+use crate::timer_component_state::OwnedTimerComponentState;
 
 /// type
 pub type OwnedTimerComponent = Box<TimerComponent>;
diff --git a/capi/src/title_component.rs b/capi/src/title_component.rs
index 3b1ea93..a3646e9 100644
--- a/capi/src/title_component.rs
+++ b/capi/src/title_component.rs
@@ -3,10 +3,10 @@
 //! and the total number of successfully finished runs can be shown.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
+use crate::component::OwnedComponent;
 use livesplit_core::component::title::Component as TitleComponent;
 use livesplit_core::Timer;
-use title_component_state::OwnedTitleComponentState;
+use crate::title_component_state::OwnedTitleComponentState;
 
 /// type
 pub type OwnedTitleComponent = Box<TitleComponent>;
diff --git a/capi/src/total_playtime_component.rs b/capi/src/total_playtime_component.rs
index fb2d8f8..3ddd7fb 100644
--- a/capi/src/total_playtime_component.rs
+++ b/capi/src/total_playtime_component.rs
@@ -2,10 +2,10 @@
 //! time that the current category has been played for.
 
 use super::{output_vec, Json};
-use component::OwnedComponent;
+use crate::component::OwnedComponent;
 use livesplit_core::component::total_playtime::Component as TotalPlaytimeComponent;
 use livesplit_core::Timer;
-use total_playtime_component_state::OwnedTotalPlaytimeComponentState;
+use crate::total_playtime_component_state::OwnedTotalPlaytimeComponentState;
 
 /// type
 pub type OwnedTotalPlaytimeComponent = Box<TotalPlaytimeComponent>;
diff --git a/capi/staticlib/Cargo.toml b/capi/staticlib/Cargo.toml
index 123648d..7df6284 100644
--- a/capi/staticlib/Cargo.toml
+++ b/capi/staticlib/Cargo.toml
@@ -2,6 +2,7 @@
 name = "staticlib"
 version = "0.1.0"
 authors = ["Christopher Serr <christopher.serr@gmail.com>"]
+edition = "2018"
 
 [dependencies]
 livesplit-core-capi = { path = "..", default-features = false }
diff --git a/hotkey/Cargo.toml b/hotkey/Cargo.toml
index 3e511e7..3b055db 100644
--- a/hotkey/Cargo.toml
+++ b/hotkey/Cargo.toml
@@ -7,6 +7,7 @@ repository = "https://github.com/LiveSplit/livesplit-core/tree/master/hotkey"
 license = "Apache-2.0/MIT"
 description = "livesplit-hotkey provides cross-platform global hotkey hooks."
 keywords = ["speedrun", "timer", "livesplit", "hotkey", "keyboard"]
+edition = "2018"
 
 [target.'cfg(windows)'.dependencies]
 winapi = { version = "0.3.2", features = [
diff --git a/hotkey/src/emscripten/mod.rs b/hotkey/src/emscripten/mod.rs
index aff76e5..59a9df4 100644
--- a/hotkey/src/emscripten/mod.rs
+++ b/hotkey/src/emscripten/mod.rs
@@ -1,12 +1,9 @@
-extern crate parking_lot;
-
 mod key_code;
 pub use self::key_code::KeyCode;
 
-use self::parking_lot::Mutex;
+use parking_lot::Mutex;
 use std::collections::hash_map::{Entry, HashMap};
 use std::sync::Arc;
-use stdweb;
 use stdweb::web::event::{IKeyboardEvent, KeypressEvent};
 use stdweb::web::{window, EventListenerHandle, IEventTarget};
 
@@ -18,10 +15,10 @@ quick_error! {
     }
 }
 
-pub type Result<T> = ::std::result::Result<T, Error>;
+pub type Result<T> = std::result::Result<T, Error>;
 
 pub struct Hook {
-    hotkeys: Arc<Mutex<HashMap<KeyCode, Box<FnMut() + Send + 'static>>>>,
+    hotkeys: Arc<Mutex<HashMap<KeyCode, Box<dyn FnMut() + Send + 'static>>>>,
     event: Option<EventListenerHandle>,
 }
 
@@ -172,9 +169,10 @@ impl Hook {
             });
         }
 
-        let hotkeys = Arc::new(Mutex::new(
-            HashMap::<KeyCode, Box<FnMut() + Send + 'static>>::new(),
-        ));
+        let hotkeys = Arc::new(Mutex::new(HashMap::<
+            KeyCode,
+            Box<dyn FnMut() + Send + 'static>,
+        >::new()));
 
         let hotkey_map = hotkeys.clone();
 
diff --git a/hotkey/src/lib.rs b/hotkey/src/lib.rs
index e3d49a2..1de3494 100644
--- a/hotkey/src/lib.rs
+++ b/hotkey/src/lib.rs
@@ -4,22 +4,21 @@
 extern crate quick_error;
 #[macro_use]
 extern crate serde_derive;
-extern crate serde;
 
 #[cfg(windows)]
 pub mod windows;
 #[cfg(windows)]
-pub use windows::*;
+pub use crate::windows::*;
 
 #[cfg(target_os = "linux")]
 pub mod linux;
 #[cfg(target_os = "linux")]
-pub use linux::*;
+pub use crate::linux::*;
 
 #[cfg(target_os = "emscripten")]
 pub mod emscripten;
 #[cfg(target_os = "emscripten")]
-pub use emscripten::*;
+pub use crate::emscripten::*;
 #[cfg(target_os = "emscripten")]
 #[macro_use]
 extern crate stdweb;
@@ -27,7 +26,7 @@ extern crate stdweb;
 #[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
 pub mod wasm;
 #[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
-pub use wasm::*;
+pub use crate::wasm::*;
 
 #[cfg(not(any(
     windows,
@@ -42,4 +41,4 @@ pub mod other;
     target_os = "emscripten",
     all(target_arch = "wasm32", target_os = "unknown")
 )))]
-pub use other::*;
+pub use crate::other::*;
diff --git a/hotkey/src/linux/mod.rs b/hotkey/src/linux/mod.rs
index 7f7b153..38173da 100644
--- a/hotkey/src/linux/mod.rs
+++ b/hotkey/src/linux/mod.rs
@@ -1,21 +1,17 @@
-extern crate mio;
-extern crate promising_future;
-extern crate x11_dl;
-
 mod key_code;
 pub use self::key_code::KeyCode;
 
-use self::mio::unix::EventedFd;
-use self::mio::{Events, Poll, PollOpt, Ready, Registration, SetReadiness, Token};
-use self::promising_future::{future_promise, Promise};
-use self::x11_dl::xlib::{
-    Display, GrabModeAsync, KeyPress, KeyPressMask, Mod2Mask, XErrorEvent, XKeyEvent, Xlib,
-};
+use mio::unix::EventedFd;
+use mio::{Events, Poll, PollOpt, Ready, Registration, SetReadiness, Token};
+use promising_future::{future_promise, Promise};
 use std::collections::hash_map::{Entry, HashMap};
 use std::os::raw::{c_int, c_uint, c_ulong};
 use std::sync::mpsc::{channel, Sender};
 use std::thread::{self, JoinHandle};
 use std::{mem, ptr};
+use x11_dl::xlib::{
+    Display, GrabModeAsync, KeyPress, KeyPressMask, Mod2Mask, XErrorEvent, XKeyEvent, Xlib,
+};
 
 quick_error! {
     #[derive(Debug)]
@@ -29,10 +25,14 @@ quick_error! {
     }
 }
 
-pub type Result<T> = ::std::result::Result<T, Error>;
+pub type Result<T> = std::result::Result<T, Error>;
 
 enum Message {
-    Register(KeyCode, Box<FnMut() + Send + 'static>, Promise<Result<()>>),
+    Register(
+        KeyCode,
+        Box<dyn FnMut() + Send + 'static>,
+        Promise<Result<()>>,
+    ),
     Unregister(KeyCode, Promise<Result<()>>),
     End,
 }
@@ -92,14 +92,16 @@ impl Hook {
                 X_TOKEN,
                 Ready::readable() | Ready::writable(),
                 PollOpt::edge(),
-            ).map_err(|_| Error::EPoll)?;
+            )
+            .map_err(|_| Error::EPoll)?;
 
             poll.register(
                 &registration,
                 PING_TOKEN,
                 Ready::readable(),
                 PollOpt::edge(),
-            ).map_err(|_| Error::EPoll)?;
+            )
+            .map_err(|_| Error::EPoll)?;
 
             struct XData(Xlib, *mut Display, c_ulong);
             unsafe impl Send for XData {}
@@ -237,8 +239,8 @@ impl Hook {
 fn test() {
     let hook = Hook::new().unwrap();
     hook.register(KeyCode::NumPad0, || println!("A")).unwrap();
-    thread::sleep(::std::time::Duration::from_secs(5));
+    thread::sleep(std::time::Duration::from_secs(5));
     hook.unregister(KeyCode::NumPad0).unwrap();
     hook.register(KeyCode::NumPad1, || println!("B")).unwrap();
-    thread::sleep(::std::time::Duration::from_secs(5));
+    thread::sleep(std::time::Duration::from_secs(5));
 }
diff --git a/hotkey/src/other/mod.rs b/hotkey/src/other/mod.rs
index 05cf5dd..31d41b4 100644
--- a/hotkey/src/other/mod.rs
+++ b/hotkey/src/other/mod.rs
@@ -4,7 +4,7 @@ quick_error! {
     }
 }
 
-pub type Result<T> = ::std::result::Result<T, Error>;
+pub type Result<T> = StdResult<T, Error>;
 
 #[derive(Debug, Eq, PartialEq, Hash, Copy, Clone, Serialize, Deserialize)]
 pub struct KeyCode;
@@ -28,7 +28,7 @@ impl Hook {
     }
 }
 
-use std::{str::FromStr, result::Result as StdResult};
+use std::{result::Result as StdResult, str::FromStr};
 
 impl FromStr for KeyCode {
     type Err = ();
diff --git a/hotkey/src/wasm/mod.rs b/hotkey/src/wasm/mod.rs
index 3d4de44..0766f14 100644
--- a/hotkey/src/wasm/mod.rs
+++ b/hotkey/src/wasm/mod.rs
@@ -13,12 +13,12 @@ quick_error! {
     }
 }
 
-pub type Result<T> = ::std::result::Result<T, Error>;
+pub type Result<T> = std::result::Result<T, Error>;
 
-pub type EventListenerHandle = Box<Fn(&str)>;
+pub type EventListenerHandle = Box<dyn Fn(&str)>;
 
 pub struct Hook {
-    hotkeys: Arc<Mutex<HashMap<KeyCode, Box<FnMut() + Send + 'static>>>>,
+    hotkeys: Arc<Mutex<HashMap<KeyCode, Box<dyn FnMut() + Send + 'static>>>>,
     event: Option<Box<EventListenerHandle>>,
 }
 
@@ -49,9 +49,10 @@ pub unsafe extern "C" fn HotkeyHook_callback(
 
 impl Hook {
     pub fn new() -> Result<Self> {
-        let hotkeys = Arc::new(Mutex::new(
-            HashMap::<KeyCode, Box<FnMut() + Send + 'static>>::new(),
-        ));
+        let hotkeys = Arc::new(Mutex::new(HashMap::<
+            KeyCode,
+            Box<dyn FnMut() + Send + 'static>,
+        >::new()));
 
         let hotkey_map = hotkeys.clone();
         let event = Box::new(Box::new(move |code: &str| {
diff --git a/hotkey/src/windows/mod.rs b/hotkey/src/windows/mod.rs
index 4063b85..42f2135 100644
--- a/hotkey/src/windows/mod.rs
+++ b/hotkey/src/windows/mod.rs
@@ -1,24 +1,21 @@
-extern crate parking_lot;
-extern crate winapi;
-
 mod key_code;
 pub use self::key_code::KeyCode;
 
-use self::parking_lot::Mutex;
-use self::winapi::ctypes::c_int;
-use self::winapi::shared::minwindef::{DWORD, LPARAM, LRESULT, UINT, WPARAM};
-use self::winapi::shared::windef::HHOOK;
-use self::winapi::um::libloaderapi::GetModuleHandleW;
-use self::winapi::um::processthreadsapi::GetCurrentThreadId;
-use self::winapi::um::winuser::{
-    CallNextHookEx, GetMessageW, PostThreadMessageW, SetWindowsHookExW, UnhookWindowsHookEx,
-};
-use self::winapi::um::winuser::{KBDLLHOOKSTRUCT, WH_KEYBOARD_LL, WM_KEYDOWN};
+use parking_lot::Mutex;
 use std::cell::RefCell;
 use std::collections::hash_map::{Entry, HashMap};
 use std::sync::mpsc::{channel, Sender};
 use std::sync::Arc;
 use std::{mem, ptr, thread};
+use winapi::ctypes::c_int;
+use winapi::shared::minwindef::{DWORD, LPARAM, LRESULT, UINT, WPARAM};
+use winapi::shared::windef::HHOOK;
+use winapi::um::libloaderapi::GetModuleHandleW;
+use winapi::um::processthreadsapi::GetCurrentThreadId;
+use winapi::um::winuser::{
+    CallNextHookEx, GetMessageW, PostThreadMessageW, SetWindowsHookExW, UnhookWindowsHookEx,
+};
+use winapi::um::winuser::{KBDLLHOOKSTRUCT, WH_KEYBOARD_LL, WM_KEYDOWN};
 
 const MSG_EXIT: UINT = 0x400;
 
@@ -33,11 +30,11 @@ quick_error! {
     }
 }
 
-pub type Result<T> = ::std::result::Result<T, Error>;
+pub type Result<T> = std::result::Result<T, Error>;
 
 pub struct Hook {
     thread_id: DWORD,
-    hotkeys: Arc<Mutex<HashMap<KeyCode, Box<FnMut() + Send + 'static>>>>,
+    hotkeys: Arc<Mutex<HashMap<KeyCode, Box<dyn FnMut() + Send + 'static>>>>,
 }
 
 impl Drop for Hook {
@@ -79,9 +76,10 @@ unsafe extern "system" fn callback_proc(code: c_int, wparam: WPARAM, lparam: LPA
 
 impl Hook {
     pub fn new() -> Result<Self> {
-        let hotkeys = Arc::new(Mutex::new(
-            HashMap::<KeyCode, Box<FnMut() + Send + 'static>>::new(),
-        ));
+        let hotkeys = Arc::new(Mutex::new(HashMap::<
+            KeyCode,
+            Box<dyn FnMut() + Send + 'static>,
+        >::new()));
 
         let (initialized_tx, initialized_rx) = channel();
         let (events_tx, events_rx) = channel();
@@ -175,8 +173,8 @@ impl Hook {
 fn test() {
     let hook = Hook::new().unwrap();
     hook.register(KeyCode::NumPad0, || println!("A")).unwrap();
-    thread::sleep(::std::time::Duration::from_secs(5));
+    thread::sleep(std::time::Duration::from_secs(5));
     hook.unregister(KeyCode::NumPad0).unwrap();
     hook.register(KeyCode::NumPad1, || println!("B")).unwrap();
-    thread::sleep(::std::time::Duration::from_secs(5));
+    thread::sleep(std::time::Duration::from_secs(5));
 }
diff --git a/src/analysis/current_pace.rs b/src/analysis/current_pace.rs
index 5b08be3..cc9fd21 100644
--- a/src/analysis/current_pace.rs
+++ b/src/analysis/current_pace.rs
@@ -2,7 +2,7 @@
 //! provided. If there's no active attempt, the final time of the comparison is
 //! returned instead.
 
-use {analysis, TimeSpan, Timer, TimerPhase};
+use crate::{analysis, TimeSpan, Timer, TimerPhase};
 
 /// Calculates the current pace of the active attempt based on the comparison
 /// provided. If there's no active attempt, the final time of the comparison is
@@ -18,7 +18,8 @@ pub fn calculate(timer: &Timer, comparison: &str) -> Option<TimeSpan> {
                 timer.current_split_index().unwrap(),
                 comparison,
                 timing_method,
-            ).unwrap_or_default();
+            )
+            .unwrap_or_default();
 
             catch! {
                 let live_delta = timer.current_time()[timing_method]?
diff --git a/src/analysis/delta.rs b/src/analysis/delta.rs
index ba8b602..19b18c3 100644
--- a/src/analysis/delta.rs
+++ b/src/analysis/delta.rs
@@ -4,7 +4,7 @@
 //! the moment. This may be the case when the current attempt is slower than the
 //! comparison at the current split.
 
-use {analysis, TimeSpan, Timer, TimerPhase};
+use crate::{analysis, TimeSpan, Timer, TimerPhase};
 
 /// Calculates the delta of the current attempt to the comparison provided.
 /// Additionally a value is returned that indicates whether the delta value is a
diff --git a/src/analysis/possible_time_save.rs b/src/analysis/possible_time_save.rs
index f85f0ba..396cde3 100644
--- a/src/analysis/possible_time_save.rs
+++ b/src/analysis/possible_time_save.rs
@@ -4,7 +4,7 @@
 //! theoretically perfect segment times, this information is only an
 //! approximation of how much time can actually be saved.
 
-use {analysis, TimeSpan, Timer};
+use crate::{analysis, TimeSpan, Timer};
 
 /// Calculates how much time could be saved on the given segment with the given
 /// comparison. This information is based on the best segments. Considering the
diff --git a/src/analysis/state_helper.rs b/src/analysis/state_helper.rs
index 804c370..fb1d008 100644
--- a/src/analysis/state_helper.rs
+++ b/src/analysis/state_helper.rs
@@ -1,8 +1,8 @@
 //! Provides different helper functions.
 
-use comparison::best_segments;
-use settings::SemanticColor;
-use {Run, Segment, TimeSpan, Timer, TimerPhase, TimingMethod};
+use crate::comparison::best_segments;
+use crate::settings::SemanticColor;
+use crate::{Run, Segment, TimeSpan, Timer, TimerPhase, TimingMethod};
 
 /// Gets the last non-live delta in the run starting from `segment_index`.
 ///
@@ -22,7 +22,8 @@ pub fn last_delta(
         &run.segments()[..=segment_index],
         comparison,
         method,
-    ).map(|(split_time, comparison_time)| split_time - comparison_time)
+    )
+    .map(|(split_time, comparison_time)| split_time - comparison_time)
 }
 
 fn find_previous_non_empty_segment<F, T>(segments: &[Segment], check_segment: F) -> Option<T>
@@ -74,7 +75,8 @@ pub fn comparison_segment_time(
         &run.segments()[..segment_index],
         comparison,
         method,
-    ).unwrap_or_default();
+    )
+    .unwrap_or_default();
 
     Some(current_comparison_time - previous_comparison_time)
 }
@@ -93,9 +95,11 @@ fn segment_delta(
             &run.segments()[..segment_index],
             comparison,
             method,
-        ).map(|(split_time, comparison_time)| {
+        )
+        .map(|(split_time, comparison_time)| {
             (current_time - segment_index_comparison) - (split_time - comparison_time)
-        }).unwrap_or_else(|| current_time - segment_index_comparison),
+        })
+        .unwrap_or_else(|| current_time - segment_index_comparison),
     )
 }
 
@@ -129,7 +133,8 @@ pub fn previous_segment_time(
         segment_index,
         timer.run().segment(segment_index).split_time()[method]?,
         method,
-    ).into()
+    )
+    .into()
 }
 
 /// Gets the length of the last segment that leads up to a certain split, using
@@ -152,7 +157,8 @@ pub fn live_segment_time(
         segment_index,
         timer.current_time()[method]?,
         method,
-    ).into()
+    )
+    .into()
 }
 
 /// Gets the amount of time lost or gained on a certain split.
diff --git a/src/analysis/sum_of_segments/best.rs b/src/analysis/sum_of_segments/best.rs
index f0bbab3..7b9e027 100644
--- a/src/analysis/sum_of_segments/best.rs
+++ b/src/analysis/sum_of_segments/best.rs
@@ -8,7 +8,7 @@
 //! misleading, but sticks around for historical reasons.
 
 use super::{track_branch, track_current_run, track_personal_best_run};
-use {Segment, TimeSpan, TimingMethod};
+use crate::{Segment, TimeSpan, TimingMethod};
 
 fn populate_prediction(prediction: &mut Option<TimeSpan>, predicted_time: Option<TimeSpan>) {
     if let Some(predicted_time) = predicted_time {
@@ -89,7 +89,7 @@ fn populate_predictions(
 /// predictions buffer needs to have one more element than the list of segments
 /// provided, so that you can properly query the total Sum of Best Segments.
 /// This value is also the value that is being returned.
-#[allow(needless_range_loop)]
+#[allow(clippy::needless_range_loop)]
 pub fn calculate(
     segments: &[Segment],
     predictions: &mut [Option<TimeSpan>],
diff --git a/src/analysis/sum_of_segments/mod.rs b/src/analysis/sum_of_segments/mod.rs
index db07314..22c164e 100644
--- a/src/analysis/sum_of_segments/mod.rs
+++ b/src/analysis/sum_of_segments/mod.rs
@@ -10,7 +10,7 @@
 pub mod best;
 pub mod worst;
 
-use {Segment, Time, TimeSpan, TimingMethod};
+use crate::{Segment, Time, TimeSpan, TimingMethod};
 
 /// Calculates the Sum of Best Segments for the timing method provided. This is
 /// the fastest time possible to complete a run of a category, based on
@@ -91,7 +91,8 @@ fn track_personal_best_run(
         .checked_sub(1)
         .map_or(Some(TimeSpan::zero()), |i| {
             segments[i].personal_best_split_time()[method]
-        }) {
+        })
+    {
         for (segment_index, segment) in segments.iter().enumerate().skip(segment_index) {
             let second_split_time = segment.personal_best_split_time()[method];
             if let Some(second_split_time) = second_split_time {
diff --git a/src/analysis/sum_of_segments/worst.rs b/src/analysis/sum_of_segments/worst.rs
index 0adb7f8..3195d06 100644
--- a/src/analysis/sum_of_segments/worst.rs
+++ b/src/analysis/sum_of_segments/worst.rs
@@ -5,7 +5,7 @@
 //! possible time, but may be useful information regardless.
 
 use super::{track_branch, track_current_run, track_personal_best_run};
-use {Segment, TimeSpan, TimingMethod};
+use crate::{Segment, TimeSpan, TimingMethod};
 
 fn populate_prediction(prediction: &mut Option<TimeSpan>, predicted_time: Option<TimeSpan>) {
     if let Some(predicted_time) = predicted_time {
@@ -74,7 +74,7 @@ fn populate_predictions(
 /// it. This means that the predictions buffer needs to have one more element
 /// than the list of segments provided, so that you can properly query the total
 /// Sum of Worst Segments. This value is also the value that is being returned.
-#[allow(needless_range_loop)]
+#[allow(clippy::needless_range_loop)]
 pub fn calculate(
     segments: &[Segment],
     predictions: &mut [Option<TimeSpan>],
diff --git a/src/analysis/total_playtime.rs b/src/analysis/total_playtime.rs
index 3cb23f6..aade980 100644
--- a/src/analysis/total_playtime.rs
+++ b/src/analysis/total_playtime.rs
@@ -2,7 +2,7 @@
 //! Timer. For a Run, all the durations stored in the Attempt History are summed
 //! together. For a Timer, the current attempt's duration is also factored in.
 
-use {Run, TimeSpan, Timer, TimingMethod};
+use crate::{Run, TimeSpan, Timer, TimingMethod};
 
 /// Allows calculating the total playtime.
 pub trait TotalPlaytime {
diff --git a/src/comparison/average_segments.rs b/src/comparison/average_segments.rs
index ef2b0df..2c3c1f1 100644
--- a/src/comparison/average_segments.rs
+++ b/src/comparison/average_segments.rs
@@ -5,7 +5,7 @@
 //! runner.
 
 use super::ComparisonGenerator;
-use {Attempt, Segment, TimeSpan, TimingMethod};
+use crate::{Attempt, Segment, TimeSpan, TimingMethod};
 
 /// The Comparison Generator for calculating the Average Segments of a Run. The
 /// Average Segments are calculated through a weighted arithmetic mean that
@@ -27,7 +27,7 @@ fn generate(segments: &mut [Segment], method: TimingMethod) {
 
     // TODO: This may actually be possible to be fixed with a window like
     // iterator.
-    #[allow(needless_range_loop)]
+    #[allow(clippy::needless_range_loop)]
     for i in 0..segments.len() {
         // TODO: Borrowcheck. if accumulated.is_some() is only necessary because
         // we can't assign to the outer variable otherwise.
@@ -40,7 +40,8 @@ fn generate(segments: &mut [Segment], method: TimingMethod) {
                     // Skip all the combined segments
                     let skip = catch! {
                         segments[i.checked_sub(1)?].segment_history().get(id)?[method].is_none()
-                    }.unwrap_or(false);
+                    }
+                    .unwrap_or(false);
 
                     if !skip {
                         total_weights += current_weight;
diff --git a/src/comparison/balanced_pb.rs b/src/comparison/balanced_pb.rs
index 8642d21..390dd55 100644
--- a/src/comparison/balanced_pb.rs
+++ b/src/comparison/balanced_pb.rs
@@ -12,8 +12,8 @@
 //! be smoothed out throughout the whole comparison.
 
 use super::ComparisonGenerator;
+use crate::{Attempt, Segment, TimeSpan, TimingMethod};
 use ordered_float::OrderedFloat;
-use {Attempt, Segment, TimeSpan, TimingMethod};
 
 /// The Comparison Generator for calculating a comparison which has the same
 /// final time as the runner's Personal Best. Unlike the Personal Best however,
@@ -72,7 +72,8 @@ fn generate(
                 // Skip all the combined segments
                 let skip = catch! {
                     segments[i.checked_sub(1)?].segment_history().get(id)?[method].is_none()
-                }.unwrap_or(false);
+                }
+                .unwrap_or(false);
 
                 if !skip {
                     weighted_segment_times.push((current_weight, time));
diff --git a/src/comparison/best_segments.rs b/src/comparison/best_segments.rs
index 0e7cdac..d17980a 100644
--- a/src/comparison/best_segments.rs
+++ b/src/comparison/best_segments.rs
@@ -1,8 +1,8 @@
 //! Defines the Comparison Generator for calculating the Best Segments of a Run.
 
 use super::ComparisonGenerator;
-use analysis::sum_of_segments::best::calculate;
-use {Attempt, Segment, Time, TimingMethod};
+use crate::analysis::sum_of_segments::best::calculate;
+use crate::{Attempt, Segment, Time, TimingMethod};
 
 /// The Comparison Generator for calculating the Best Segments of a Run.
 #[derive(Copy, Clone, Debug)]
diff --git a/src/comparison/best_split_times.rs b/src/comparison/best_split_times.rs
index dfd6839..f44330f 100644
--- a/src/comparison/best_split_times.rs
+++ b/src/comparison/best_split_times.rs
@@ -4,7 +4,7 @@
 //! time for each individual split from all of the runner's attempts.
 
 use super::ComparisonGenerator;
-use {Attempt, Segment, TimeSpan, TimingMethod};
+use crate::{Attempt, Segment, TimeSpan, TimingMethod};
 
 /// The Comparison Generator for the Best Split Times. The Best Split Times
 /// represent the best pace that the runner was ever on up to each split in the
diff --git a/src/comparison/median_segments.rs b/src/comparison/median_segments.rs
index 86ab5b4..a74aa78 100644
--- a/src/comparison/median_segments.rs
+++ b/src/comparison/median_segments.rs
@@ -4,8 +4,8 @@
 //! suited to represent the current performance of a runner.
 
 use super::ComparisonGenerator;
+use crate::{Attempt, Segment, TimeSpan, TimingMethod};
 use ordered_float::OrderedFloat;
-use {Attempt, Segment, TimeSpan, TimingMethod};
 
 /// The Comparison Generator for calculating the Median Segments of a Run. The
 /// Median Segments are calculated through a weighted median that gives more
@@ -27,7 +27,7 @@ fn generate(segments: &mut [Segment], medians: &mut Vec<(f64, f64)>, method: Tim
 
     // TODO: This may actually be possible to be fixed with a window like
     // iterator.
-    #[allow(needless_range_loop)]
+    #[allow(clippy::needless_range_loop)]
     for i in 0..segments.len() {
         // TODO: Borrowcheck. if accumulated.is_some() is only necessary because
         // we can't assign to the outer variable otherwise.
@@ -41,7 +41,8 @@ fn generate(segments: &mut [Segment], medians: &mut Vec<(f64, f64)>, method: Tim
                     // Skip all the combined segments
                     let skip = catch! {
                         segments[i.checked_sub(1)?].segment_history().get(id)?[method].is_none()
-                    }.unwrap_or(false);
+                    }
+                    .unwrap_or(false);
 
                     if !skip {
                         medians.push((current_weight, time.total_seconds()));
diff --git a/src/comparison/mod.rs b/src/comparison/mod.rs
index 668c2be..1c35a4b 100644
--- a/src/comparison/mod.rs
+++ b/src/comparison/mod.rs
@@ -24,8 +24,8 @@ pub use self::median_segments::MedianSegments;
 pub use self::none::None;
 pub use self::worst_segments::WorstSegments;
 
+use crate::{Attempt, Segment, Timer};
 use std::fmt::Debug;
-use {Attempt, Segment, Timer};
 
 /// Defines the Personal Best comparison. This module mostly just serves for
 /// providing the names of the comparison, as the Personal Best is not a
@@ -66,19 +66,19 @@ pub trait ComparisonGenerator: Debug + Sync + Send + ComparisonGeneratorClone {
 /// as a Trait Object.
 pub trait ComparisonGeneratorClone {
     /// Clones the Comparison Generator as a Trait Object.
-    fn clone_box(&self) -> Box<ComparisonGenerator>;
+    fn clone_box(&self) -> Box<dyn ComparisonGenerator>;
 }
 
 impl<T> ComparisonGeneratorClone for T
 where
     T: 'static + ComparisonGenerator + Clone,
 {
-    fn clone_box(&self) -> Box<ComparisonGenerator> {
+    fn clone_box(&self) -> Box<dyn ComparisonGenerator> {
         Box::new(self.clone())
     }
 }
 
-impl Clone for Box<ComparisonGenerator> {
+impl Clone for Box<dyn ComparisonGenerator> {
     fn clone(&self) -> Self {
         self.clone_box()
     }
@@ -86,7 +86,7 @@ impl Clone for Box<ComparisonGenerator> {
 
 /// Creates a list of all the Comparison Generators that are active by default.
 /// Which comparison generators are in this list may change in future versions.
-pub fn default_generators() -> Vec<Box<ComparisonGenerator>> {
+pub fn default_generators() -> Vec<Box<dyn ComparisonGenerator>> {
     vec![
         Box::new(BestSegments),
         Box::new(BestSplitTimes),
diff --git a/src/comparison/none.rs b/src/comparison/none.rs
index 2bfd71a..0607804 100644
--- a/src/comparison/none.rs
+++ b/src/comparison/none.rs
@@ -2,7 +2,7 @@
 //! Comparison intentionally leaves all split times empty.
 
 use super::ComparisonGenerator;
-use {Attempt, Segment, Time};
+use crate::{Attempt, Segment, Time};
 
 /// The Comparison Generator for the None comparison. The None Comparison
 /// intentionally leaves all split times empty.
diff --git a/src/comparison/worst_segments.rs b/src/comparison/worst_segments.rs
index 642c406..011e1d1 100644
--- a/src/comparison/worst_segments.rs
+++ b/src/comparison/worst_segments.rs
@@ -1,8 +1,8 @@
 //! Defines the Comparison Generator for calculating the Worst Segments of a Run.
 
 use super::ComparisonGenerator;
-use analysis::sum_of_segments::worst::calculate;
-use {Attempt, Segment, Time, TimingMethod};
+use crate::analysis::sum_of_segments::worst::calculate;
+use crate::{Attempt, Segment, Time, TimingMethod};
 
 /// The Comparison Generator for calculating the Worst Segments of a Run.
 #[derive(Copy, Clone, Debug)]
diff --git a/src/component/blank_space.rs b/src/component/blank_space.rs
index 5fd774b..dbf0922 100644
--- a/src/component/blank_space.rs
+++ b/src/component/blank_space.rs
@@ -3,11 +3,11 @@
 //! anything other than a background. It mostly serves as padding between other
 //! components.
 
+use crate::settings::{Field, Gradient, SettingsDescription, Value};
+use crate::Timer;
 use serde_json::{to_writer, Result};
-use settings::{Field, Gradient, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::io::Write;
-use Timer;
 
 /// The Blank Space Component is simply an empty component that doesn't show
 /// anything other than a background. It mostly serves as padding between other
@@ -77,7 +77,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         "Blank Space".into()
     }
 
diff --git a/src/component/current_comparison.rs b/src/component/current_comparison.rs
index d343e20..7e92186 100644
--- a/src/component/current_comparison.rs
+++ b/src/component/current_comparison.rs
@@ -3,11 +3,11 @@
 //! comparison that is currently selected to be compared against.
 
 use super::DEFAULT_INFO_TEXT_GRADIENT;
+use crate::settings::{Color, Field, Gradient, SettingsDescription, Value};
+use crate::Timer;
 use serde_json::{to_writer, Result};
-use settings::{Color, Field, Gradient, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::io::Write;
-use Timer;
 
 /// The Current Comparison Component is a component that shows the name of the
 /// comparison that is currently selected to be compared against.
@@ -97,7 +97,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         "Current Comparison".into()
     }
 
diff --git a/src/component/current_pace.rs b/src/component/current_pace.rs
index f3a7627..40a4daf 100644
--- a/src/component/current_pace.rs
+++ b/src/component/current_pace.rs
@@ -4,13 +4,13 @@
 //! comparison for the remainder of the run.
 
 use super::DEFAULT_INFO_TEXT_GRADIENT;
-use analysis::current_pace;
+use crate::analysis::current_pace;
+use crate::settings::{Color, Field, Gradient, SettingsDescription, Value};
+use crate::timing::formatter::{Accuracy, Regular, TimeFormatter};
+use crate::{comparison, Timer, TimerPhase};
 use serde_json::{to_writer, Result};
-use settings::{Color, Field, Gradient, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::io::Write;
-use timing::formatter::{Accuracy, Regular, TimeFormatter};
-use {comparison, Timer, TimerPhase};
 
 /// The Current Pace Component is a component that shows a prediction of the
 /// current attempt's final time, if the current attempt's pace matches the
@@ -107,7 +107,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         self.text(
             self.settings
                 .comparison_override
@@ -116,7 +116,7 @@ impl Component {
         )
     }
 
-    fn text(&self, comparison: Option<&str>) -> Cow<str> {
+    fn text(&self, comparison: Option<&str>) -> Cow<'_, str> {
         if let Some(comparison) = comparison {
             match comparison {
                 comparison::personal_best::NAME => "Current Pace".into(),
diff --git a/src/component/delta/mod.rs b/src/component/delta/mod.rs
index e10f247..6a2ec8e 100644
--- a/src/component/delta/mod.rs
+++ b/src/component/delta/mod.rs
@@ -3,13 +3,13 @@
 //! attempt is compared to the chosen comparison.
 
 use super::DEFAULT_INFO_TEXT_GRADIENT;
-use analysis::{delta, state_helper};
+use crate::analysis::{delta, state_helper};
+use crate::settings::{Color, Field, Gradient, SemanticColor, SettingsDescription, Value};
+use crate::timing::formatter::{Accuracy, Delta, TimeFormatter};
+use crate::{comparison, GeneralLayoutSettings, Timer};
 use serde_json::{to_writer, Result};
-use settings::{Color, Field, Gradient, SemanticColor, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::io::Write;
-use timing::formatter::{Accuracy, Delta, TimeFormatter};
-use {comparison, GeneralLayoutSettings, Timer};
 
 #[cfg(test)]
 mod tests;
@@ -109,7 +109,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         if let Some(comparison) = &self.settings.comparison_override {
             format!("Delta ({})", comparison).into()
         } else {
diff --git a/src/component/detailed_timer/mod.rs b/src/component/detailed_timer/mod.rs
index e705080..198ef0b 100644
--- a/src/component/detailed_timer/mod.rs
+++ b/src/component/detailed_timer/mod.rs
@@ -5,14 +5,16 @@
 //! comparisons, the segment icon, and the segment's name, can also be shown.
 
 use super::timer;
-use comparison::{self, best_segments, none};
+use crate::comparison::{self, best_segments, none};
+use crate::settings::{Field, Gradient, SemanticColor, SettingsDescription, Value};
+use crate::timing::formatter::none_wrapper::DashWrapper;
+use crate::timing::formatter::{
+    timer as formatter, Accuracy, DigitsFormat, Short, TimeFormatter, DASH,
+};
+use crate::{CachedImageId, GeneralLayoutSettings, TimeSpan, Timer, TimerPhase, TimingMethod};
 use serde_json::{to_writer, Result};
-use settings::{Field, Gradient, SemanticColor, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::io::Write;
-use timing::formatter::none_wrapper::DashWrapper;
-use timing::formatter::{timer as formatter, Accuracy, DigitsFormat, Short, TimeFormatter, DASH};
-use {CachedImageId, GeneralLayoutSettings, TimeSpan, Timer, TimerPhase, TimingMethod};
 
 #[cfg(test)]
 mod tests;
@@ -144,7 +146,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         "Detailed Timer".into()
     }
 
@@ -235,7 +237,8 @@ impl Component {
                 background,
                 time: formatter::Time::with_digits_format(
                     self.settings.segment_timer.digits_format,
-                ).format(t)
+                )
+                .format(t)
                 .to_string(),
                 fraction: formatter::Fraction::with_accuracy(self.settings.segment_timer.accuracy)
                     .format(t)
@@ -276,7 +279,8 @@ impl Component {
                     .current_split()
                     .filter(|_| display_icon)
                     .map(|s| s.icon()),
-            ).map(str::to_owned);
+            )
+            .map(str::to_owned);
 
         let segment_name = if self.settings.show_segment_name {
             timer.current_split().map(|s| s.name().to_owned())
diff --git a/src/component/graph.rs b/src/component/graph.rs
index fadbb9e..af2e2cb 100644
--- a/src/component/graph.rs
+++ b/src/component/graph.rs
@@ -3,11 +3,11 @@
 //! the chosen comparison throughout the whole attempt. All the individual
 //! deltas are shown as points in a graph.
 
+use crate::settings::{Color, Field, SettingsDescription, Value};
+use crate::{analysis, comparison, GeneralLayoutSettings, TimeSpan, Timer, TimerPhase};
 use serde_json::{to_writer, Result};
-use settings::{Color, Field, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::io::Write;
-use {analysis, comparison, GeneralLayoutSettings, TimeSpan, Timer, TimerPhase};
 
 const GRAPH_EDGE_VALUE: f32 = 200.0;
 const GRAPH_EDGE_MIN: f32 = 5.0;
@@ -177,7 +177,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         self.text(
             self.settings
                 .comparison_override
@@ -186,7 +186,7 @@ impl Component {
         )
     }
 
-    fn text(&self, comparison: Option<&str>) -> Cow<str> {
+    fn text(&self, comparison: Option<&str>) -> Cow<'_, str> {
         if let Some(comparison) = comparison {
             format!("Graph ({})", comparison::shorten(comparison)).into()
         } else {
diff --git a/src/component/mod.rs b/src/component/mod.rs
index 3178b5c..a581292 100644
--- a/src/component/mod.rs
+++ b/src/component/mod.rs
@@ -19,9 +19,9 @@ pub mod timer;
 pub mod title;
 pub mod total_playtime;
 
+use crate::settings::{Color, Gradient};
 use palette::rgb::Rgb;
 use palette::Alpha;
-use settings::{Color, Gradient};
 use std::marker::PhantomData;
 
 const DEFAULT_INFO_TEXT_GRADIENT: Gradient = Gradient::Vertical(
diff --git a/src/component/possible_time_save.rs b/src/component/possible_time_save.rs
index 8a23af5..262f4fb 100644
--- a/src/component/possible_time_save.rs
+++ b/src/component/possible_time_save.rs
@@ -5,14 +5,14 @@
 //! for the remainder of the current attempt.
 
 use super::DEFAULT_INFO_TEXT_GRADIENT;
-use analysis::possible_time_save;
+use crate::analysis::possible_time_save;
+use crate::settings::{Color, Field, Gradient, SettingsDescription, Value};
+use crate::timing::formatter::{Accuracy, PossibleTimeSave, TimeFormatter};
+use crate::{comparison, Timer, TimerPhase};
 use serde_json::{to_writer, Result};
-use settings::{Color, Field, Gradient, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::fmt::Write as FmtWrite;
 use std::io::Write;
-use timing::formatter::{Accuracy, PossibleTimeSave, TimeFormatter};
-use {comparison, Timer, TimerPhase};
 
 /// The Possible Time Save Component is a component that shows how much time the
 /// chosen comparison could've saved for the current segment, based on the Best
@@ -115,7 +115,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         self.text(
             self.settings
                 .comparison_override
@@ -124,7 +124,7 @@ impl Component {
         )
     }
 
-    fn text(&self, comparison: Option<&str>) -> Cow<str> {
+    fn text(&self, comparison: Option<&str>) -> Cow<'_, str> {
         let text = if self.settings.total_possible_time_save {
             "Total Possible Time Save"
         } else {
diff --git a/src/component/previous_segment.rs b/src/component/previous_segment.rs
index d22378b..f1dfdd7 100644
--- a/src/component/previous_segment.rs
+++ b/src/component/previous_segment.rs
@@ -6,13 +6,13 @@
 //! active time loss whenever the runner is losing time on the current segment.
 
 use super::DEFAULT_INFO_TEXT_GRADIENT;
+use crate::settings::{Color, Field, Gradient, SemanticColor, SettingsDescription, Value};
+use crate::timing::formatter::{Accuracy, Delta, PossibleTimeSave, TimeFormatter};
+use crate::{analysis, comparison, GeneralLayoutSettings, Timer, TimerPhase};
 use serde_json::{to_writer, Result};
-use settings::{Color, Field, Gradient, SemanticColor, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::fmt::Write as FmtWrite;
 use std::io::Write;
-use timing::formatter::{Accuracy, Delta, PossibleTimeSave, TimeFormatter};
-use {analysis, comparison, GeneralLayoutSettings, Timer, TimerPhase};
 
 /// The Previous Segment Component is a component that shows how much time was
 /// saved or lost during the previous segment based on the chosen comparison.
@@ -116,7 +116,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         self.text(
             false,
             self.settings
@@ -126,7 +126,7 @@ impl Component {
         )
     }
 
-    fn text(&self, live: bool, comparison: Option<&str>) -> Cow<str> {
+    fn text(&self, live: bool, comparison: Option<&str>) -> Cow<'_, str> {
         let text = if live {
             "Live Segment"
         } else {
@@ -229,7 +229,8 @@ impl Component {
                 time,
                 " / {}",
                 PossibleTimeSave::with_accuracy(self.settings.accuracy).format(previous_possible)
-            ).unwrap();
+            )
+            .unwrap();
         }
 
         State {
diff --git a/src/component/separator.rs b/src/component/separator.rs
index fa2b82f..77cd4ab 100644
--- a/src/component/separator.rs
+++ b/src/component/separator.rs
@@ -2,11 +2,11 @@
 //! Separator Component is a simple component that only serves to render
 //! separators between components.
 
+use crate::settings::{SettingsDescription, Value};
+use crate::Timer;
 use serde_json::{to_writer, Result};
-use settings::{SettingsDescription, Value};
 use std::borrow::Cow;
 use std::io::Write;
-use Timer;
 
 /// The Separator Component is a simple component that only serves to render
 /// separators between components.
@@ -34,7 +34,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         "Separator".into()
     }
 
@@ -56,6 +56,6 @@ impl Component {
     /// This panics if the type of the value to be set is not compatible with
     /// the type of the setting's value. A panic can also occur if the index of
     /// the setting provided is out of bounds.
-    #[allow(needless_pass_by_value)]
+    #[allow(clippy::needless_pass_by_value)]
     pub fn set_value(&mut self, _index: usize, _value: Value) {}
 }
diff --git a/src/component/splits/mod.rs b/src/component/splits/mod.rs
index 781e0a8..2285f55 100644
--- a/src/component/splits/mod.rs
+++ b/src/component/splits/mod.rs
@@ -5,17 +5,19 @@
 //! list provides scrolling functionality, so not every segment needs to be
 //! shown all the time.
 
-use analysis::split_color;
+use crate::analysis::split_color;
+use crate::settings::{
+    Color, Field, Gradient, ListGradient, SemanticColor, SettingsDescription, Value,
+};
+use crate::timing::formatter::{Delta, Regular, TimeFormatter};
+use crate::{
+    analysis, comparison, CachedImageId, GeneralLayoutSettings, Segment, TimeSpan, Timer,
+    TimingMethod,
+};
 use serde_json::{to_writer, Result};
-use settings::{Color, Field, Gradient, ListGradient, SemanticColor, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::cmp::{max, min};
 use std::io::Write;
-use timing::formatter::{Delta, Regular, TimeFormatter};
-use {
-    analysis, comparison, CachedImageId, GeneralLayoutSettings, Segment, TimeSpan, Timer,
-    TimingMethod,
-};
 
 #[cfg(test)]
 mod tests;
@@ -346,7 +348,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         "Splits".into()
     }
 
@@ -416,7 +418,8 @@ impl Component {
             .skip(skip_count)
             .filter(|&((i, _), _)| {
                 i - skip_count < take_count || (always_show_last_split && i + 1 == run.len())
-            }).map(|((i, segment), icon_id)| {
+            })
+            .map(|((i, segment), icon_id)| {
                 let columns = columns
                     .iter()
                     .map(|column| {
@@ -429,7 +432,8 @@ impl Component {
                             current_split,
                             method,
                         )
-                    }).collect();
+                    })
+                    .collect();
 
                 if let Some(icon_change) = icon_id.update_with(Some(segment.icon())) {
                     icon_changes.push(IconChange {
@@ -444,7 +448,8 @@ impl Component {
                     is_current_split: Some(i) == current_split,
                     index: i,
                 }
-            }).collect();
+            })
+            .collect();
 
         if fill_with_blank_space && splits.len() < visual_split_count {
             let blank_split_count = visual_split_count - splits.len();
@@ -688,12 +693,14 @@ fn column_update_value(
             return None;
         }
 
-        if column.update_trigger == Contextual && analysis::check_live_delta(
-            timer,
-            !column.update_with.is_segment_based(),
-            comparison,
-            method,
-        ).is_none()
+        if column.update_trigger == Contextual
+            && analysis::check_live_delta(
+                timer,
+                !column.update_with.is_segment_based(),
+                comparison,
+                method,
+            )
+            .is_none()
         {
             // It's contextual and the live delta shouldn't be shown yet.
             return None;
diff --git a/src/component/sum_of_best.rs b/src/component/sum_of_best.rs
index 3755127..212bc70 100644
--- a/src/component/sum_of_best.rs
+++ b/src/component/sum_of_best.rs
@@ -8,13 +8,13 @@
 //! around for historical reasons.
 
 use super::DEFAULT_INFO_TEXT_GRADIENT;
-use analysis::sum_of_segments::calculate_best;
+use crate::analysis::sum_of_segments::calculate_best;
+use crate::settings::{Color, Field, Gradient, SettingsDescription, Value};
+use crate::timing::formatter::{Accuracy, Regular, TimeFormatter};
+use crate::Timer;
 use serde_json::{to_writer, Result};
-use settings::{Color, Field, Gradient, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::io::Write;
-use timing::formatter::{Accuracy, Regular, TimeFormatter};
-use Timer;
 
 /// The Sum of Best Segments Component shows the fastest possible time to
 /// complete a run of this category, based on information collected from all the
@@ -111,7 +111,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         "Sum of Best Segments".into()
     }
 
diff --git a/src/component/text.rs b/src/component/text.rs
index 774bc9e..cb1409f 100644
--- a/src/component/text.rs
+++ b/src/component/text.rs
@@ -4,8 +4,8 @@
 //! a situation where you have a label and a value.
 
 use super::DEFAULT_INFO_TEXT_GRADIENT;
+use crate::settings::{Color, Field, Gradient, SettingsDescription, Value};
 use serde_json::{to_writer, Result};
-use settings::{Color, Field, Gradient, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::io::Write;
 use std::mem::replace;
@@ -156,8 +156,8 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
-        let name: Cow<str> = match &self.settings.text {
+    pub fn name(&self) -> Cow<'_, str> {
+        let name: Cow<'_, str> = match &self.settings.text {
             Text::Center(text) => text.as_str().into(),
             Text::Split(left, right) => {
                 let mut name = String::with_capacity(left.len() + right.len() + 1);
diff --git a/src/component/timer.rs b/src/component/timer.rs
index 21a7834..99b2c99 100644
--- a/src/component/timer.rs
+++ b/src/component/timer.rs
@@ -3,15 +3,15 @@
 //! a digital clock. The color of the time shown is based on a how well the
 //! current attempt is doing compared to the chosen comparison.
 
-use analysis::split_color;
+use crate::analysis::split_color;
+use crate::settings::{Color, Field, Gradient, SemanticColor, SettingsDescription, Value};
+use crate::timing::formatter::{timer as formatter, Accuracy, DigitsFormat, TimeFormatter};
+use crate::{GeneralLayoutSettings, TimeSpan, Timer, TimerPhase, TimingMethod};
 use palette::rgb::LinSrgb;
 use palette::Hsv;
 use serde_json::{to_writer, Result};
-use settings::{Color, Field, Gradient, SemanticColor, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::io::Write;
-use timing::formatter::{timer as formatter, Accuracy, DigitsFormat, TimeFormatter};
-use {GeneralLayoutSettings, TimeSpan, Timer, TimerPhase, TimingMethod};
 
 /// The Timer Component is a component that shows the total time of the current
 /// attempt as a digital clock. The color of the time shown is based on a how
@@ -113,14 +113,15 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         "Timer".into()
     }
 
     /// Calculates the component's state based on the timer and the layout
     /// settings provided.
     pub fn state(&self, timer: &Timer, layout_settings: &GeneralLayoutSettings) -> State {
-        let method = self.settings
+        let method = self
+            .settings
             .timing_method
             .unwrap_or_else(|| timer.current_timing_method());
         let time = timer.current_time();
@@ -143,7 +144,8 @@ impl Component {
                         false,
                         current_comparison,
                         method,
-                    ).or(SemanticColor::AheadGainingTime)
+                    )
+                    .or(SemanticColor::AheadGainingTime)
                 } else {
                     SemanticColor::AheadGainingTime
                 }
diff --git a/src/component/title/mod.rs b/src/component/title/mod.rs
index 078eff4..4563278 100644
--- a/src/component/title/mod.rs
+++ b/src/component/title/mod.rs
@@ -3,11 +3,11 @@
 //! that is being run. Additionally, the game icon, the attempt count, and the
 //! total number of finished runs can be shown.
 
+use crate::settings::{Alignment, Color, Field, Gradient, SettingsDescription, Value};
+use crate::{CachedImageId, Timer, TimerPhase};
 use serde_json::{to_writer, Result};
-use settings::{Alignment, Color, Field, Gradient, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::io::Write;
-use {CachedImageId, Timer, TimerPhase};
 
 #[cfg(test)]
 mod tests;
@@ -151,7 +151,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         "Title".into()
     }
 
diff --git a/src/component/total_playtime.rs b/src/component/total_playtime.rs
index 60f47e3..5ca0a86 100644
--- a/src/component/total_playtime.rs
+++ b/src/component/total_playtime.rs
@@ -3,13 +3,13 @@
 //! current category has been played for.
 
 use super::DEFAULT_INFO_TEXT_GRADIENT;
-use analysis::total_playtime;
+use crate::analysis::total_playtime;
+use crate::settings::{Color, Field, Gradient, SettingsDescription, Value};
+use crate::timing::formatter::{Days, Regular, TimeFormatter};
+use crate::Timer;
 use serde_json::{to_writer, Result};
-use settings::{Color, Field, Gradient, SettingsDescription, Value};
 use std::borrow::Cow;
 use std::io::Write;
-use timing::formatter::{Days, Regular, TimeFormatter};
-use Timer;
 
 /// The Total Playtime Component is a component that shows the total amount of
 /// time that the current category has been played for.
@@ -102,7 +102,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         "Total Playtime".into()
     }
 
diff --git a/src/hotkey_config.rs b/src/hotkey_config.rs
index 2678e96..40b0ab0 100644
--- a/src/hotkey_config.rs
+++ b/src/hotkey_config.rs
@@ -1,6 +1,8 @@
-use hotkey::KeyCode;
+#![allow(clippy::trivially_copy_pass_by_ref)]
+
+use crate::hotkey::KeyCode;
+use crate::settings::{Field, SettingsDescription, Value};
 use serde_json::{self, from_reader, to_writer};
-use settings::{Field, SettingsDescription, Value};
 use std::io::{Read, Write};
 
 /// The configuration to use for a Hotkey System. It describes with keys to use
@@ -28,7 +30,7 @@ pub struct HotkeyConfig {
 #[cfg(any(windows, target_os = "linux"))]
 impl Default for HotkeyConfig {
     fn default() -> Self {
-        use hotkey::KeyCode::*;
+        use crate::hotkey::KeyCode::*;
         Self {
             split: NumPad1,
             reset: NumPad3,
@@ -47,7 +49,7 @@ impl Default for HotkeyConfig {
 ))]
 impl Default for HotkeyConfig {
     fn default() -> Self {
-        use hotkey::KeyCode::*;
+        use crate::hotkey::KeyCode::*;
         Self {
             split: Numpad1,
             reset: Numpad3,
@@ -122,10 +124,10 @@ impl HotkeyConfig {
             self.previous_comparison,
             self.next_comparison,
         ]
-            .iter()
-            .enumerate()
-            .filter(|&(i, _)| i != index)
-            .any(|(_, &v)| v == value);
+        .iter()
+        .enumerate()
+        .filter(|&(i, _)| i != index)
+        .any(|(_, &v)| v == value);
 
         if any {
             return Err(());
diff --git a/src/hotkey_system.rs b/src/hotkey_system.rs
index 9eef08d..16bf4c3 100644
--- a/src/hotkey_system.rs
+++ b/src/hotkey_system.rs
@@ -1,9 +1,9 @@
-use hotkey::{Hook, KeyCode};
+use crate::hotkey::{Hook, KeyCode};
+use crate::{HotkeyConfig, SharedTimer};
 use std::sync::atomic::{AtomicBool, Ordering};
 use std::sync::Arc;
-use {HotkeyConfig, SharedTimer};
 
-pub use hotkey::{Error, Result};
+pub use crate::hotkey::{Error, Result};
 
 /// With a Hotkey System the runner can use hotkeys on their keyboard to control
 /// the Timer. The hotkeys are global, so the application doesn't need to be in
diff --git a/src/image.rs b/src/image.rs
index dfefc44..c4cf129 100644
--- a/src/image.rs
+++ b/src/image.rs
@@ -90,7 +90,7 @@ impl Image {
     pub fn modify(&mut self, data: &[u8]) {
         #[cfg(feature = "image-shrinking")]
         let data = {
-            use image_shrinking::shrink;
+            use crate::image_shrinking::shrink;
             const MAX_IMAGE_SIZE: u32 = 128;
 
             shrink(data, MAX_IMAGE_SIZE)
diff --git a/src/image_shrinking.rs b/src/image_shrinking.rs
index d701798..8d558ef 100644
--- a/src/image_shrinking.rs
+++ b/src/image_shrinking.rs
@@ -1,4 +1,4 @@
-use imagelib::{
+use image::{
     bmp, gif, guess_format, hdr, ico, jpeg, load_from_memory_with_format, png, pnm, tiff, webp,
     DynamicImage, ImageDecoder, ImageError, ImageFormat,
 };
@@ -9,7 +9,7 @@ fn decode_dims<D: ImageDecoder>(mut decoder: D) -> Result<(u32, u32), ImageError
     decoder.dimensions()
 }
 
-fn shrink_inner(data: &[u8], max_dim: u32) -> Result<Cow<[u8]>, ImageError> {
+fn shrink_inner(data: &[u8], max_dim: u32) -> Result<Cow<'_, [u8]>, ImageError> {
     let format = guess_format(data)?;
 
     let cursor = Cursor::new(data);
@@ -48,6 +48,6 @@ fn shrink_inner(data: &[u8], max_dim: u32) -> Result<Cow<[u8]>, ImageError> {
     }
 }
 
-pub fn shrink(data: &[u8], max_dim: u32) -> Cow<[u8]> {
+pub fn shrink(data: &[u8], max_dim: u32) -> Cow<'_, [u8]> {
     shrink_inner(data, max_dim).unwrap_or_else(|_| data.into())
 }
diff --git a/src/layout/component.rs b/src/layout/component.rs
index df02abb..6e8fb9a 100644
--- a/src/layout/component.rs
+++ b/src/layout/component.rs
@@ -1,12 +1,12 @@
 use super::{ComponentSettings, ComponentState, GeneralSettings};
-use component::{
+use crate::component::{
     blank_space, current_comparison, current_pace, delta, detailed_timer, graph,
     possible_time_save, previous_segment, separator, splits, sum_of_best, text, timer, title,
     total_playtime,
 };
-use settings::{SettingsDescription, Value};
+use crate::settings::{SettingsDescription, Value};
+use crate::Timer;
 use std::borrow::Cow;
-use Timer;
 
 /// A Component provides information about a run in a way that is easy to
 /// visualize. This type can store any of the components provided by this crate.
@@ -130,7 +130,7 @@ impl Component {
     }
 
     /// Accesses the name of the component.
-    pub fn name(&self) -> Cow<str> {
+    pub fn name(&self) -> Cow<'_, str> {
         match self {
             Component::BlankSpace(component) => component.name(),
             Component::CurrentComparison(component) => component.name(),
diff --git a/src/layout/component_settings.rs b/src/layout/component_settings.rs
index 21e7b09..d908bd1 100644
--- a/src/layout/component_settings.rs
+++ b/src/layout/component_settings.rs
@@ -1,5 +1,5 @@
 use super::Component;
-use component::{
+use crate::component::{
     blank_space, current_comparison, current_pace, delta, detailed_timer, graph,
     possible_time_save, previous_segment, separator, splits, sum_of_best, text, timer, title,
     total_playtime,
diff --git a/src/layout/component_state.rs b/src/layout/component_state.rs
index fa32dc8..c8f9427 100644
--- a/src/layout/component_state.rs
+++ b/src/layout/component_state.rs
@@ -1,4 +1,4 @@
-use component::{
+use crate::component::{
     blank_space, current_comparison, current_pace, delta, detailed_timer, graph,
     possible_time_save, previous_segment, separator, splits, sum_of_best, text, timer, title,
     total_playtime,
diff --git a/src/layout/editor/mod.rs b/src/layout/editor/mod.rs
index 389d538..d9f92c8 100644
--- a/src/layout/editor/mod.rs
+++ b/src/layout/editor/mod.rs
@@ -5,9 +5,9 @@
 //! Interface.
 
 use super::{Component, Layout, LayoutState};
-use settings::Value;
+use crate::settings::Value;
+use crate::Timer;
 use std::result::Result as StdResult;
-use Timer;
 
 mod state;
 
diff --git a/src/layout/editor/state.rs b/src/layout/editor/state.rs
index e5207aa..1d7780c 100644
--- a/src/layout/editor/state.rs
+++ b/src/layout/editor/state.rs
@@ -1,6 +1,6 @@
 use super::Editor;
+use crate::settings::SettingsDescription;
 use serde_json::{to_writer, Result as JsonResult};
-use settings::SettingsDescription;
 use std::io::Write;
 
 /// Represents the current state of the Layout Editor in order to visualize it
diff --git a/src/layout/general_settings.rs b/src/layout/general_settings.rs
index 261a7fc..5288d7f 100644
--- a/src/layout/general_settings.rs
+++ b/src/layout/general_settings.rs
@@ -1,4 +1,4 @@
-use settings::{Color, Field, Gradient, SettingsDescription, Value};
+use crate::settings::{Color, Field, Gradient, SettingsDescription, Value};
 
 /// The general settings of the layout that apply to all components.
 #[derive(Clone, Serialize, Deserialize)]
diff --git a/src/layout/layout_state.rs b/src/layout/layout_state.rs
index 6e8af43..82e14fc 100644
--- a/src/layout/layout_state.rs
+++ b/src/layout/layout_state.rs
@@ -1,6 +1,6 @@
 use super::ComponentState;
+use crate::settings::{Color, Gradient};
 use serde_json::{to_writer, Result};
-use settings::{Color, Gradient};
 use std::io::Write;
 
 /// The state object describes the information to visualize for the layout.
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index f19978e..c1b36ec 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -18,8 +18,8 @@ pub use self::general_settings::GeneralSettings;
 pub use self::layout_settings::LayoutSettings;
 pub use self::layout_state::LayoutState;
 
-use component::{previous_segment, splits, timer, title};
-use timing::Timer;
+use crate::component::{previous_segment, splits, timer, title};
+use crate::timing::Timer;
 
 /// A Layout allows you to combine multiple components together to visualize a
 /// variety of information the runner is interested in.
@@ -86,7 +86,8 @@ impl Layout {
     pub fn state(&mut self, timer: &Timer) -> LayoutState {
         let settings = &self.settings;
         LayoutState {
-            components: self.components
+            components: self
+                .components
                 .iter_mut()
                 .map(|c| c.state(timer, settings))
                 .collect(),
diff --git a/src/lib.rs b/src/lib.rs
index e47c03c..4c62b95 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,9 +1,18 @@
-#![allow(unknown_lints)]
-#![warn(missing_docs, clippy)]
+#![warn(
+    missing_docs,
+    clippy::correctness,
+    clippy::perf,
+    clippy::style,
+    clippy::complexity
+)]
 // Necessary for some larger quick-error based errors.
 #![recursion_limit = "128"]
 // Clippy false positives
-#![allow(block_in_if_condition_stmt, redundant_closure_call)]
+#![allow(
+    clippy::block_in_if_condition_stmt,
+    clippy::redundant_closure_call,
+    clippy::new_ret_no_self
+)]
 
 //! livesplit-core is a library that provides a lot of functionality for creating a speedrun timer.
 //!
@@ -38,33 +47,17 @@
 //! assert_eq!(timer.current_phase(), TimerPhase::NotRunning);
 //! ```
 
-extern crate base64;
-extern crate byteorder;
-extern crate chrono;
 #[macro_use]
 extern crate derive_more;
-extern crate image as imagelib;
-extern crate odds;
-extern crate ordered_float;
 #[macro_use]
 extern crate quick_error;
-extern crate quick_xml;
-extern crate serde;
 #[macro_use]
 extern crate serde_derive;
-extern crate serde_json;
-extern crate unicase;
-extern crate utf8;
-
-pub extern crate indexmap;
-pub extern crate livesplit_hotkey as hotkey;
-pub extern crate palette;
-pub extern crate parking_lot;
 
 mod platform;
 
 #[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
-pub use platform::*;
+pub use crate::platform::*;
 
 macro_rules! catch {
     ($($code:tt)*) => {
@@ -87,15 +80,20 @@ pub mod settings;
 mod tests_helper;
 pub mod timing;
 
-pub use self::hotkey_config::HotkeyConfig;
-pub use self::hotkey_system::HotkeySystem;
-pub use self::image::{CachedImageId, Image};
-pub use self::layout::{
-    Component, Editor as LayoutEditor, GeneralSettings as GeneralLayoutSettings, Layout,
-};
-pub use self::run::{Attempt, Editor as RunEditor, Run, RunMetadata, Segment, SegmentHistory};
-pub use self::timing::{
-    AtomicDateTime, GameTime, RealTime, SharedTimer, Time, TimeSpan, TimeStamp, Timer, TimerPhase,
-    TimingMethod,
+pub use {
+    crate::{
+        hotkey_config::HotkeyConfig,
+        hotkey_system::HotkeySystem,
+        image::{CachedImageId, Image},
+        layout::{
+            Component, Editor as LayoutEditor, GeneralSettings as GeneralLayoutSettings, Layout,
+        },
+        run::{Attempt, Editor as RunEditor, Run, RunMetadata, Segment, SegmentHistory},
+        timing::{
+            AtomicDateTime, GameTime, RealTime, SharedTimer, Time, TimeSpan, TimeStamp, Timer,
+            TimerPhase, TimingMethod,
+        },
+    },
+    chrono::{DateTime, Utc},
+    indexmap, livesplit_hotkey as hotkey, palette, parking_lot,
 };
-pub use chrono::{DateTime, Utc};
diff --git a/src/run/attempt.rs b/src/run/attempt.rs
index 7be6a19..262968d 100644
--- a/src/run/attempt.rs
+++ b/src/run/attempt.rs
@@ -1,4 +1,4 @@
-use {AtomicDateTime, Time, TimeSpan};
+use crate::{AtomicDateTime, Time, TimeSpan};
 
 /// An Attempt describes information about an attempt to run a specific category
 /// by a specific runner in the past. Every time a new attempt is started and
diff --git a/src/run/editor/cleaning.rs b/src/run/editor/cleaning.rs
index 79b315b..f6ecd34 100644
--- a/src/run/editor/cleaning.rs
+++ b/src/run/editor/cleaning.rs
@@ -6,12 +6,12 @@
 //! occurrences of this and allows you to delete them individually if any of
 //! them seem wrong.
 
-use analysis::sum_of_segments::{best, track_branch};
+use crate::analysis::sum_of_segments::{best, track_branch};
+use crate::timing::formatter::{Short, TimeFormatter};
+use crate::{Attempt, Run, Segment, TimeSpan, TimingMethod};
 use chrono::Local;
 use std::fmt;
 use std::mem::replace;
-use timing::formatter::{Short, TimeFormatter};
-use {Attempt, Run, Segment, TimeSpan, TimingMethod};
 
 /// A Sum of Best Cleaner allows you to interactively remove potential issues in
 /// the Segment History that lead to an inaccurate Sum of Best. If you skip a
@@ -65,7 +65,7 @@ pub struct CleanUp {
 }
 
 impl<'r> fmt::Display for PotentialCleanUp<'r> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         let short = Short::new();
 
         let method = match self.method {
@@ -112,7 +112,7 @@ impl<'r> fmt::Display for PotentialCleanUp<'r> {
 }
 
 impl<'a> From<PotentialCleanUp<'a>> for CleanUp {
-    fn from(potential: PotentialCleanUp) -> Self {
+    fn from(potential: PotentialCleanUp<'_>) -> Self {
         potential.clean_up
     }
 }
@@ -129,7 +129,7 @@ impl<'r> SumOfBestCleaner<'r> {
     }
 
     /// Applies a clean up to the Run.
-    #[allow(needless_pass_by_value)]
+    #[allow(clippy::needless_pass_by_value)]
     pub fn apply(&mut self, clean_up: CleanUp) {
         self.run
             .segment_mut(clean_up.ending_index)
@@ -141,7 +141,7 @@ impl<'r> SumOfBestCleaner<'r> {
 
     /// Returns the next potential clean up. If there are no more potential
     /// clean ups, `None` is returned.
-    pub fn next_potential_clean_up(&mut self) -> Option<PotentialCleanUp> {
+    pub fn next_potential_clean_up(&mut self) -> Option<PotentialCleanUp<'_>> {
         loop {
             match replace(&mut self.state, State::Poisoned) {
                 State::Poisoned => unreachable!(),
@@ -168,7 +168,8 @@ impl<'r> SumOfBestCleaner<'r> {
                     };
                 }
                 State::IteratingHistory(state) => {
-                    let iter = self.run
+                    let iter = self
+                        .run
                         .segment(state.parent.segment_index)
                         .segment_history()
                         .iter()
@@ -240,7 +241,8 @@ fn check_prediction<'a>(
                         t - predictions[(starting_index + 1) as usize]
                             .expect("Start time must not be empty")
                     }),
-                    attempt: run.attempt_history()
+                    attempt: run
+                        .attempt_history()
                         .iter()
                         .find(|attempt| attempt.index() == run_index)
                         .expect("The attempt has to exist"),
diff --git a/src/run/editor/mod.rs b/src/run/editor/mod.rs
index fefeec1..9e377da 100644
--- a/src/run/editor/mod.rs
+++ b/src/run/editor/mod.rs
@@ -5,11 +5,11 @@
 //! kind of User Interface.
 
 use super::{ComparisonError, ComparisonResult};
+use crate::timing::ParseError as ParseTimeSpanError;
+use crate::{comparison, CachedImageId, Image, Run, Segment, Time, TimeSpan, TimingMethod};
 use odds::slice::rotate_left;
 use std::mem::swap;
 use std::num::ParseIntError;
-use timing::ParseError as ParseTimeSpanError;
-use {comparison, unicase, CachedImageId, Image, Run, Segment, Time, TimeSpan, TimingMethod};
 
 pub mod cleaning;
 mod fuzzy_list;
@@ -131,7 +131,7 @@ impl Editor {
     /// Grants mutable access to the actively selected segment row. You can
     /// select multiple segment rows at the same time, but only the one that is
     /// most recently selected is the active segment.
-    pub fn active_segment(&mut self) -> SegmentRow {
+    pub fn active_segment(&mut self) -> SegmentRow<'_> {
         SegmentRow::new(self.active_segment_index(), self)
     }
 
@@ -687,28 +687,17 @@ impl Editor {
     ) -> ComparisonResult<()> {
         let comparison = comparison.into();
         self.run.add_custom_comparison(comparison.as_str())?;
-        // TODO: Borrowcheck (remaining_segments isn't used after this block
-        // anymore. NLL should fix this)
-        {
-            let mut remaining_segments = self.run.segments_mut().as_mut_slice();
-
-            for segment in run.segments().iter().take(run.len().saturating_sub(1)) {
-                // TODO: Borrowcheck (new_start is only necessary because the
-                // remaining_segments reassignment doesn't work inside this
-                // if)
-                let new_start = if let Some((segment_index, my_segment)) = remaining_segments
-                    .iter_mut()
-                    .enumerate()
-                    .find(|(_, s)| unicase::eq(segment.name(), s.name()))
-                {
-                    *my_segment.comparison_mut(&comparison) = segment.personal_best_split_time();
-                    segment_index + 1
-                } else {
-                    0
-                };
-                // TODO: Borrowcheck (get rid of the move block around
-                // remaining_segments)
-                remaining_segments = &mut { remaining_segments }[new_start..];
+
+        let mut remaining_segments = self.run.segments_mut().as_mut_slice();
+
+        for segment in run.segments().iter().take(run.len().saturating_sub(1)) {
+            if let Some((segment_index, my_segment)) = remaining_segments
+                .iter_mut()
+                .enumerate()
+                .find(|(_, s)| unicase::eq(segment.name(), s.name()))
+            {
+                *my_segment.comparison_mut(&comparison) = segment.personal_best_split_time();
+                remaining_segments = &mut remaining_segments[segment_index + 1..];
             }
         }
 
@@ -781,27 +770,24 @@ impl Editor {
     /// one of the indices is invalid. The indices are based on the
     /// `comparison_names` field of the Run Editor's `State`.
     pub fn move_comparison(&mut self, src_index: usize, dst_index: usize) -> Result<(), ()> {
-        // TODO: Borrowcheck (comparisons isn't used after this block anymore. NLL
-        // should fix this)
-        {
-            let comparisons = self.run.custom_comparisons_mut();
-            let (src_index, dst_index) = (src_index + 1, dst_index + 1);
-            if src_index >= comparisons.len() || dst_index >= comparisons.len() {
-                return Err(());
-            }
-            if src_index == dst_index {
-                return Ok(());
-            }
+        let comparisons = self.run.custom_comparisons_mut();
+        let (src_index, dst_index) = (src_index + 1, dst_index + 1);
+        if src_index >= comparisons.len() || dst_index >= comparisons.len() {
+            return Err(());
+        }
+        if src_index == dst_index {
+            return Ok(());
+        }
 
-            if src_index > dst_index {
-                rotate_left(
-                    &mut comparisons[dst_index..=src_index],
-                    src_index - dst_index,
-                );
-            } else {
-                rotate_left(&mut comparisons[src_index..=dst_index], 1);
-            }
+        if src_index > dst_index {
+            rotate_left(
+                &mut comparisons[dst_index..=src_index],
+                src_index - dst_index,
+            );
+        } else {
+            rotate_left(&mut comparisons[src_index..=dst_index], 1);
         }
+
         self.raise_run_edited();
         Ok(())
     }
@@ -828,7 +814,7 @@ impl Editor {
     /// combined segment time might be faster than the sum of the individual
     /// best segments. The Sum of Best Cleaner will point out all of these and
     /// allows you to delete them individually if any of them seem wrong.
-    pub fn clean_sum_of_best(&mut self) -> SumOfBestCleaner {
+    pub fn clean_sum_of_best(&mut self) -> SumOfBestCleaner<'_> {
         SumOfBestCleaner::new(&mut self.run)
     }
 }
diff --git a/src/run/editor/segment_row.rs b/src/run/editor/segment_row.rs
index 471a0ac..dc0f11f 100644
--- a/src/run/editor/segment_row.rs
+++ b/src/run/editor/segment_row.rs
@@ -1,5 +1,5 @@
 use super::{Editor, ParseError};
-use {Image, TimeSpan};
+use crate::{Image, TimeSpan};
 
 /// A Segment Row describes the segment in the Run Editor actively selected for
 /// editing.
diff --git a/src/run/editor/state.rs b/src/run/editor/state.rs
index d1c330c..3760c0c 100644
--- a/src/run/editor/state.rs
+++ b/src/run/editor/state.rs
@@ -1,11 +1,11 @@
 use super::{Editor, SegmentRow, TimingMethod};
-use comparison::personal_best;
-use run::RunMetadata;
+use crate::comparison::personal_best;
+use crate::run::RunMetadata;
+use crate::timing::formatter::none_wrapper::EmptyWrapper;
+use crate::timing::formatter::{Accuracy, Short, TimeFormatter};
+use crate::CachedImageId;
 use serde_json::{to_writer, Result as JsonResult};
 use std::io::Write;
-use timing::formatter::none_wrapper::EmptyWrapper;
-use timing::formatter::{Accuracy, Short, TimeFormatter};
-use CachedImageId;
 
 /// Represents the current state of the Run Editor in order to visualize it
 /// properly.
diff --git a/src/run/mod.rs b/src/run/mod.rs
index 15e65e1..4fb9398 100644
--- a/src/run/mod.rs
+++ b/src/run/mod.rs
@@ -32,14 +32,14 @@ pub use self::run_metadata::RunMetadata;
 pub use self::segment::Segment;
 pub use self::segment_history::SegmentHistory;
 
-use comparison::{default_generators, personal_best, ComparisonGenerator};
+use crate::comparison::{default_generators, personal_best, ComparisonGenerator};
+use crate::{AtomicDateTime, Image, Time, TimeSpan, TimingMethod};
 use ordered_float::OrderedFloat;
 use std::borrow::Cow;
 use std::cmp::max;
 use std::collections::HashSet;
 use std::path::PathBuf;
 use unicase;
-use {AtomicDateTime, Image, Time, TimeSpan, TimingMethod};
 
 /// A Run stores the split times for a specific game and category of a runner.
 ///
@@ -74,7 +74,7 @@ pub struct Run {
 }
 
 #[derive(Clone, Debug)]
-struct ComparisonGenerators(Vec<Box<ComparisonGenerator>>);
+struct ComparisonGenerators(Vec<Box<dyn ComparisonGenerator>>);
 
 impl PartialEq for ComparisonGenerators {
     fn eq(&self, other: &ComparisonGenerators) -> bool {
@@ -286,7 +286,7 @@ impl Run {
     /// includes both the custom comparisons defined by the user and the
     /// Comparison Generators.
     #[inline]
-    pub fn comparisons(&self) -> ComparisonsIter {
+    pub fn comparisons(&self) -> ComparisonsIter<'_> {
         ComparisonsIter {
             custom: &self.custom_comparisons,
             generators: &self.comparison_generators.0,
@@ -295,13 +295,13 @@ impl Run {
 
     /// Accesses the Comparison Generators in use by this Run.
     #[inline]
-    pub fn comparison_generators(&self) -> &[Box<ComparisonGenerator>] {
+    pub fn comparison_generators(&self) -> &[Box<dyn ComparisonGenerator>] {
         &self.comparison_generators.0
     }
 
     /// Grants mutable access to the Comparison Generators in use by this Run.
     #[inline]
-    pub fn comparison_generators_mut(&mut self) -> &mut Vec<Box<ComparisonGenerator>> {
+    pub fn comparison_generators_mut(&mut self) -> &mut Vec<Box<dyn ComparisonGenerator>> {
         &mut self.comparison_generators.0
     }
 
@@ -364,7 +364,8 @@ impl Run {
         ended: Option<AtomicDateTime>,
         pause_time: Option<TimeSpan>,
     ) {
-        let index = self.attempt_history
+        let index = self
+            .attempt_history
             .iter()
             .map(Attempt::index)
             .max()
@@ -454,7 +455,7 @@ impl Run {
     ///
     /// If either is empty, the dash is omitted. If an extended category name is
     /// used, the variables of the category are appended in a parenthesis.
-    pub fn extended_name(&self, use_extended_category_name: bool) -> Cow<str> {
+    pub fn extended_name(&self, use_extended_category_name: bool) -> Cow<'_, str> {
         let mut name = Cow::Borrowed(self.game_name());
 
         let category_name = if use_extended_category_name {
@@ -486,8 +487,8 @@ impl Run {
         show_region: bool,
         show_platform: bool,
         show_variables: bool,
-    ) -> Cow<str> {
-        let mut category_name: Cow<str> = Cow::Borrowed(&self.category_name);
+    ) -> Cow<'_, str> {
+        let mut category_name: Cow<'_, str> = Cow::Borrowed(&self.category_name);
         let mut after_parenthesis = "";
 
         if category_name.is_empty() {
@@ -497,7 +498,8 @@ impl Run {
         let mut is_empty = true;
         let mut has_pushed = false;
 
-        if let Some((i, u)) = self.category_name
+        if let Some((i, u)) = self
+            .category_name
             .find('(')
             .and_then(|i| self.category_name[i..].find(')').map(|u| (i, i + u)))
         {
@@ -787,7 +789,8 @@ impl Run {
         let mut last_split_time = Time::zero();
 
         let segments = self.segments.iter_mut().take(current_split_index);
-        let index = self.attempt_history
+        let index = self
+            .attempt_history
             .last()
             .expect("There is no attempt in the Attempt History.")
             .index();
@@ -851,7 +854,7 @@ fn fix_history_from_best_segment_times(segment: &mut Segment, method: TimingMeth
 /// custom comparisons defined by the user and the Comparison Generators.
 pub struct ComparisonsIter<'a> {
     custom: &'a [String],
-    generators: &'a [Box<ComparisonGenerator>],
+    generators: &'a [Box<dyn ComparisonGenerator>],
 }
 
 impl<'a> Iterator for ComparisonsIter<'a> {
diff --git a/src/run/parser/composite.rs b/src/run/parser/composite.rs
index 2cd73a0..253adaf 100644
--- a/src/run/parser/composite.rs
+++ b/src/run/parser/composite.rs
@@ -35,10 +35,10 @@ use super::{
     shit_split, source_live_timer, splits_io, splitterz, splitty, time_split_tracker, urn,
     worstrun, wsplit, TimerKind,
 };
+use crate::Run;
 use std::io::{self, BufRead, Seek, SeekFrom};
 use std::path::PathBuf;
 use std::result::Result as StdResult;
-use Run;
 
 quick_error! {
     /// The Error type for splits files that couldn't be parsed by the Composite
diff --git a/src/run/parser/face_split.rs b/src/run/parser/face_split.rs
index 094921e..4012bf6 100644
--- a/src/run/parser/face_split.rs
+++ b/src/run/parser/face_split.rs
@@ -1,10 +1,10 @@
 //! Provides the parser for FaceSplit splits files.
 
+use crate::{timing, Image, RealTime, Run, Segment, Time, TimeSpan};
 use std::borrow::Cow;
 use std::io::{self, BufRead};
 use std::num::ParseIntError;
 use std::result::Result as StdResult;
-use {timing, Image, RealTime, Run, Segment, Time, TimeSpan};
 
 quick_error! {
     /// The Error type for splits files that couldn't be parsed by the FaceSplit
diff --git a/src/run/parser/flitter/mod.rs b/src/run/parser/flitter/mod.rs
index e7f9b27..cea295c 100644
--- a/src/run/parser/flitter/mod.rs
+++ b/src/run/parser/flitter/mod.rs
@@ -1,8 +1,8 @@
 //! Provides the parser for Flitter splits files.
 
+use crate::{comparison::world_record, Run, Segment, Time, TimeSpan};
 use std::io::BufRead;
 use std::result::Result as StdResult;
-use {comparison::world_record, Run, Segment, Time, TimeSpan};
 
 mod s_expressions;
 
@@ -51,28 +51,25 @@ pub fn parse<R: BufRead>(source: R) -> Result<Run> {
         run.add_custom_comparison(world_record::NAME).unwrap();
     }
 
-    // FIXME: NLL
-    {
-        let segments = run.segments_mut();
+    let segments = run.segments_mut();
 
-        segments.extend(splits.split_names.into_iter().map(Segment::new));
+    segments.extend(splits.split_names.into_iter().map(Segment::new));
 
-        if let Some(pb) = splits.personal_best {
-            for (segment, pb) in segments.iter_mut().zip(pb.splits) {
-                segment.set_personal_best_split_time(Time::new().with_real_time(pb.time));
-            }
+    if let Some(pb) = splits.personal_best {
+        for (segment, pb) in segments.iter_mut().zip(pb.splits) {
+            segment.set_personal_best_split_time(Time::new().with_real_time(pb.time));
         }
+    }
 
-        if let Some(golds) = splits.golds {
-            for (segment, gold) in segments.iter_mut().zip(golds) {
-                segment.set_best_segment_time(Time::new().with_real_time(gold.duration));
-            }
+    if let Some(golds) = splits.golds {
+        for (segment, gold) in segments.iter_mut().zip(golds) {
+            segment.set_best_segment_time(Time::new().with_real_time(gold.duration));
         }
+    }
 
-        if let Some(wr) = splits.world_record {
-            for (segment, wr) in segments.iter_mut().zip(wr.splits) {
-                segment.comparison_mut(world_record::NAME).real_time = wr.time;
-            }
+    if let Some(wr) = splits.world_record {
+        for (segment, wr) in segments.iter_mut().zip(wr.splits) {
+            segment.comparison_mut(world_record::NAME).real_time = wr.time;
         }
     }
 
diff --git a/src/run/parser/flitter/s_expressions.rs b/src/run/parser/flitter/s_expressions.rs
index a111239..e34e5a4 100644
--- a/src/run/parser/flitter/s_expressions.rs
+++ b/src/run/parser/flitter/s_expressions.rs
@@ -57,7 +57,7 @@ impl de::Error for Error {
     }
 }
 
-pub type Result<T> = ::std::result::Result<T, Error>;
+pub type Result<T> = std::result::Result<T, Error>;
 
 pub struct Deserializer<B: BufRead> {
     decoder: BufReadDecoder<B>,
diff --git a/src/run/parser/livesplit.rs b/src/run/parser/livesplit.rs
index 49c1dbd..6e64a05 100644
--- a/src/run/parser/livesplit.rs
+++ b/src/run/parser/livesplit.rs
@@ -5,12 +5,12 @@ use super::xml_util::{
     attribute, attribute_err, end_tag, optional_attribute_err, parse_attributes, parse_base,
     parse_children, reencode_children, text, text_as_bytes_err, text_err, text_parsed,
 };
+use crate::{AtomicDateTime, Run, RunMetadata, Segment, Time, TimeSpan};
 use chrono::{DateTime, TimeZone, Utc};
 use quick_xml::Reader;
 use std::io::BufRead;
 use std::path::PathBuf;
 use std::str;
-use {base64, AtomicDateTime, Run, RunMetadata, Segment, Time, TimeSpan};
 
 pub use super::xml_util::{Error, Result};
 
diff --git a/src/run/parser/llanfair.rs b/src/run/parser/llanfair.rs
index 89809b4..1873360 100644
--- a/src/run/parser/llanfair.rs
+++ b/src/run/parser/llanfair.rs
@@ -1,11 +1,11 @@
 //! Provides the parser for Llanfair splits files.
 
+use crate::{Image, RealTime, Run, Segment, Time, TimeSpan};
 use byteorder::{ReadBytesExt, BE};
-use imagelib::{png, ColorType, ImageBuffer, Rgba};
+use image::{png, ColorType, ImageBuffer, Rgba};
 use std::io::{self, Read, Seek, SeekFrom};
 use std::result::Result as StdResult;
 use std::str::{from_utf8, Utf8Error};
-use {Image, RealTime, Run, Segment, Time, TimeSpan};
 
 quick_error! {
     /// The Error type for splits files that couldn't be parsed by the Llanfair
@@ -60,37 +60,14 @@ pub fn parse<R: Read + Seek>(mut source: R) -> Result<Run> {
     // https://docs.oracle.com/javase/7/docs/platform/serialization/spec/protocol.html
 
     const HEADER: [u8; 30] = [
-        0xAC,
-        0xED, // Magic
-        0x00,
-        0x05, // Version
+        0xAC, 0xED, // Magic
+        0x00, 0x05, // Version
         0x73, // New Object
         0x72, // New Class Declaration
-        0x00,
-        0x16, // Length of Class Name
+        0x00, 0x16, // Length of Class Name
         // org.fenix.llanfair.Run
-        0x6F,
-        0x72,
-        0x67,
-        0x2E,
-        0x66,
-        0x65,
-        0x6E,
-        0x69,
-        0x78,
-        0x2E,
-        0x6C,
-        0x6C,
-        0x61,
-        0x6E,
-        0x66,
-        0x61,
-        0x69,
-        0x72,
-        0x2E,
-        0x52,
-        0x75,
-        0x6E,
+        0x6F, 0x72, 0x67, 0x2E, 0x66, 0x65, 0x6E, 0x69, 0x78, 0x2E, 0x6C, 0x6C, 0x61, 0x6E, 0x66,
+        0x61, 0x69, 0x72, 0x2E, 0x52, 0x75, 0x6E,
     ];
     let mut header_buf = [0; 30];
     source.read_exact(&mut header_buf)?;
diff --git a/src/run/parser/llanfair2.rs b/src/run/parser/llanfair2.rs
index 43f6898..cf25d54 100644
--- a/src/run/parser/llanfair2.rs
+++ b/src/run/parser/llanfair2.rs
@@ -3,12 +3,12 @@
 use super::xml_util::{
     end_tag, parse_base, parse_children, single_child, text, text_err, text_parsed,
 };
+use crate::{RealTime, Run, Segment, Time, TimeSpan};
 use byteorder::{ByteOrder, BE};
-use imagelib::{png, ColorType, ImageBuffer, Rgba};
+use image::{png, ColorType, ImageBuffer, Rgba};
 use quick_xml::Reader;
 use std::cmp::min;
 use std::io::BufRead;
-use {RealTime, Run, Segment, Time, TimeSpan};
 
 pub use super::xml_util::{Error, Result};
 
diff --git a/src/run/parser/llanfair_gered.rs b/src/run/parser/llanfair_gered.rs
index a34161f..1350b88 100644
--- a/src/run/parser/llanfair_gered.rs
+++ b/src/run/parser/llanfair_gered.rs
@@ -4,12 +4,12 @@ use super::xml_util::{
     end_tag, optional_attribute_err, parse_base, parse_children, single_child, text,
     text_as_bytes_err, text_err, text_parsed,
 };
+use crate::{RealTime, Run, Segment, Time, TimeSpan};
 use base64::{self, STANDARD};
 use byteorder::{ReadBytesExt, BE};
-use imagelib::{png, ColorType, ImageBuffer, Rgba};
+use image::{png, ColorType, ImageBuffer, Rgba};
 use quick_xml::Reader;
 use std::io::{BufRead, Cursor, Seek, SeekFrom};
-use {RealTime, Run, Segment, Time, TimeSpan};
 
 pub use super::xml_util::{Error, Result};
 
diff --git a/src/run/parser/portal2_live_timer.rs b/src/run/parser/portal2_live_timer.rs
index 387070b..d33dbd0 100644
--- a/src/run/parser/portal2_live_timer.rs
+++ b/src/run/parser/portal2_live_timer.rs
@@ -1,9 +1,9 @@
 //! Provides the parser for Portal 2 Live Timer splits files.
 
+use crate::{GameTime, Run, Segment, TimeSpan};
 use std::io::{self, BufRead};
 use std::num::ParseFloatError;
 use std::result::Result as StdResult;
-use {GameTime, Run, Segment, TimeSpan};
 
 quick_error! {
     /// The Error types for splits files that couldn't be parsed by the Portal 2
@@ -175,7 +175,8 @@ pub fn parse<R: BufRead>(source: R) -> Result<Run> {
                 line = next_line;
                 let mut splits = line.split(',');
                 if splits.next() == Some(map) {
-                    let start_ticks: f64 = splits.next().ok_or(Error::ExpectedStartTicks)?.parse()?;
+                    let start_ticks: f64 =
+                        splits.next().ok_or(Error::ExpectedStartTicks)?.parse()?;
                     let end_ticks: f64 = splits.next().ok_or(Error::ExpectedEndTicks)?.parse()?;
                     let map_ticks = end_ticks - start_ticks;
                     aggregate_ticks += map_ticks;
diff --git a/src/run/parser/shit_split.rs b/src/run/parser/shit_split.rs
index 3ccf137..761b6c6 100644
--- a/src/run/parser/shit_split.rs
+++ b/src/run/parser/shit_split.rs
@@ -1,9 +1,9 @@
 //! Provides the parser for ShitSplit splits files.
 
+use crate::{timing, GameTime, Run, Segment, TimeSpan};
 use std::io::{self, BufRead};
 use std::num::ParseIntError;
 use std::result::Result as StdResult;
-use {timing, GameTime, Run, Segment, TimeSpan};
 
 quick_error! {
     /// The Error type for splits files that couldn't be parsed by the ShitSplit
diff --git a/src/run/parser/source_live_timer.rs b/src/run/parser/source_live_timer.rs
index 16202a4..80f0bf6 100644
--- a/src/run/parser/source_live_timer.rs
+++ b/src/run/parser/source_live_timer.rs
@@ -1,10 +1,10 @@
 //! Provides the parser for the SourceLiveTimer splits files.
 
+use crate::{GameTime, Run, Segment, TimeSpan};
 use serde_json::de::from_reader;
 use serde_json::Error as JsonError;
 use std::io::Read;
 use std::result::Result as StdResult;
-use {GameTime, Run, Segment, TimeSpan};
 
 quick_error! {
     /// The Error type for splits files that couldn't be parsed by the
diff --git a/src/run/parser/splits_io.rs b/src/run/parser/splits_io.rs
index 20b2550..e8bd2ef 100644
--- a/src/run/parser/splits_io.rs
+++ b/src/run/parser/splits_io.rs
@@ -1,10 +1,10 @@
 //! Provides the parser for generic Splits I/O splits files.
 
+use crate::{Run, Segment as LiveSplitSegment, Time, TimeSpan};
 use serde_json::de::from_reader;
 use serde_json::Error as JsonError;
 use std::io::Read;
 use std::result::Result as StdResult;
-use {Run, Segment as LiveSplitSegment, Time, TimeSpan};
 
 quick_error! {
     /// The Error type for splits files that couldn't be parsed by the generic
diff --git a/src/run/parser/splitterz.rs b/src/run/parser/splitterz.rs
index 874a80a..e40b306 100644
--- a/src/run/parser/splitterz.rs
+++ b/src/run/parser/splitterz.rs
@@ -1,10 +1,10 @@
 //! Provides the parser for SplitterZ splits files.
 
+use crate::{timing, Image, RealTime, Run, Segment, TimeSpan};
 use std::borrow::Cow;
 use std::io::{self, BufRead};
 use std::num::ParseIntError;
 use std::result::Result as StdResult;
-use {timing, Image, RealTime, Run, Segment, TimeSpan};
 
 quick_error! {
     /// The Error type for splits files that couldn't be parsed by the SplitterZ
@@ -41,7 +41,7 @@ quick_error! {
 /// The Result type for the SplitterZ parser.
 pub type Result<T> = StdResult<T, Error>;
 
-fn unescape(text: &str) -> Cow<str> {
+fn unescape(text: &str) -> Cow<'_, str> {
     if text.contains('‡') {
         text.replace('‡', ",").into()
     } else {
diff --git a/src/run/parser/splitty.rs b/src/run/parser/splitty.rs
index a95f02a..a8cd48e 100644
--- a/src/run/parser/splitty.rs
+++ b/src/run/parser/splitty.rs
@@ -1,10 +1,10 @@
 //! Provides the parser for Splitty splits files.
 
+use crate::{Run, Segment, Time, TimeSpan, TimingMethod};
 use serde_json::de::from_reader;
 use serde_json::Error as JsonError;
 use std::io::Read;
 use std::result::Result as StdResult;
-use {Run, Segment, Time, TimeSpan, TimingMethod};
 
 quick_error! {
     /// The Error type for splits files that couldn't be parsed by the Splitty
diff --git a/src/run/parser/time_split_tracker.rs b/src/run/parser/time_split_tracker.rs
index ce0a5d6..820c0f8 100644
--- a/src/run/parser/time_split_tracker.rs
+++ b/src/run/parser/time_split_tracker.rs
@@ -1,13 +1,13 @@
 //! Provides the parser for Time Split Tracker splits files.
 
 use super::super::ComparisonError;
+use crate::{timing, AtomicDateTime, Image, RealTime, Run, Segment, Time, TimeSpan};
 use chrono::{TimeZone, Utc};
 use std::fs::File;
 use std::io::{self, BufRead, BufReader};
 use std::num::ParseIntError;
 use std::path::PathBuf;
 use std::result::Result as StdResult;
-use {timing, AtomicDateTime, Image, RealTime, Run, Segment, Time, TimeSpan};
 
 quick_error! {
     /// The Error type for splits files that couldn't be parsed by the Time
@@ -205,7 +205,8 @@ fn parse_history(run: &mut Run, path: Option<PathBuf>) -> StdResult<(), ()> {
 
                 if catch! {
                     segment_time.real_time? < segment.best_segment_time().real_time?
-                }.unwrap_or(false)
+                }
+                .unwrap_or(false)
                 {
                     segment.set_best_segment_time(segment_time);
                 }
diff --git a/src/run/parser/timer_kind.rs b/src/run/parser/timer_kind.rs
index f5a7948..b1c4e51 100644
--- a/src/run/parser/timer_kind.rs
+++ b/src/run/parser/timer_kind.rs
@@ -39,7 +39,7 @@ pub enum TimerKind {
 }
 
 impl fmt::Display for TimerKind {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match self {
             TimerKind::LiveSplit => write!(f, "LiveSplit"),
             TimerKind::WSplit => write!(f, "WSplit"),
diff --git a/src/run/parser/urn.rs b/src/run/parser/urn.rs
index 852f255..255792d 100644
--- a/src/run/parser/urn.rs
+++ b/src/run/parser/urn.rs
@@ -1,10 +1,10 @@
 //! Provides the parser for Urn splits files.
 
+use crate::{timing, Run, Segment, Time, TimeSpan};
 use serde_json::de::from_reader;
 use serde_json::Error as JsonError;
 use std::io::Read;
 use std::result::Result as StdResult;
-use {timing, Run, Segment, Time, TimeSpan};
 
 quick_error! {
     /// The Error type for splits files that couldn't be parsed by the Urn
diff --git a/src/run/parser/worstrun.rs b/src/run/parser/worstrun.rs
index 2d0fe7d..62a99fa 100644
--- a/src/run/parser/worstrun.rs
+++ b/src/run/parser/worstrun.rs
@@ -1,10 +1,10 @@
 //! Provides the parser for worstrun splits files.
 
+use crate::{Run, Segment, Time, TimeSpan};
 use serde_json::de::from_reader;
 use serde_json::Error as JsonError;
 use std::io::Read;
 use std::result::Result as StdResult;
-use {Run, Segment, Time, TimeSpan};
 
 quick_error! {
     /// The Error type for splits files that couldn't be parsed by the worstrun
diff --git a/src/run/parser/wsplit.rs b/src/run/parser/wsplit.rs
index 682dadf..5739e9f 100644
--- a/src/run/parser/wsplit.rs
+++ b/src/run/parser/wsplit.rs
@@ -1,9 +1,9 @@
 //! Provides the parser for WSplit splits files.
 
+use crate::{Image, RealTime, Run, Segment, TimeSpan};
 use std::io::{self, BufRead};
 use std::num::{ParseFloatError, ParseIntError};
 use std::result::Result as StdResult;
-use {Image, RealTime, Run, Segment, TimeSpan};
 
 quick_error! {
     /// The Error type for splits files that couldn't be parsed by the WSplit
diff --git a/src/run/parser/xml_util.rs b/src/run/parser/xml_util.rs
index c49d054..0b5e29b 100644
--- a/src/run/parser/xml_util.rs
+++ b/src/run/parser/xml_util.rs
@@ -1,4 +1,5 @@
 use super::super::ComparisonError;
+use crate::timing;
 use chrono::ParseError as ChronoError;
 use quick_xml::events::{attributes, BytesStart, Event};
 use quick_xml::{Error as XmlError, Reader, Writer};
@@ -8,7 +9,6 @@ use std::num::{ParseFloatError, ParseIntError};
 use std::ops::Deref;
 use std::result::Result as StdResult;
 use std::{str, string};
-use timing;
 
 quick_error! {
     /// The Error type for XML-based splits files that couldn't be parsed.
@@ -96,7 +96,7 @@ impl<'a> AttributeValue<'a> {
     }
 }
 
-fn decode_cow_text(cow: Cow<[u8]>) -> Result<Cow<str>> {
+fn decode_cow_text(cow: Cow<'_, [u8]>) -> Result<Cow<'_, str>> {
     Ok(match cow {
         Cow::Borrowed(b) => Cow::Borrowed(str::from_utf8(b)?),
         Cow::Owned(o) => Cow::Owned(String::from_utf8(o)?),
@@ -119,7 +119,7 @@ where
 pub fn text<R, F>(reader: &mut Reader<R>, buf: &mut Vec<u8>, f: F) -> Result<()>
 where
     R: BufRead,
-    F: FnOnce(Cow<str>),
+    F: FnOnce(Cow<'_, str>),
 {
     text_err(reader, buf, |t| {
         f(t);
@@ -130,7 +130,7 @@ where
 pub fn text_err<R, F>(reader: &mut Reader<R>, buf: &mut Vec<u8>, f: F) -> Result<()>
 where
     R: BufRead,
-    F: FnOnce(Cow<str>) -> Result<()>,
+    F: FnOnce(Cow<'_, str>) -> Result<()>,
 {
     text_as_bytes_err(reader, buf, |b| f(decode_cow_text(b)?))
 }
@@ -138,7 +138,7 @@ where
 pub fn text_as_bytes_err<R, F, T>(reader: &mut Reader<R>, buf: &mut Vec<u8>, f: F) -> Result<T>
 where
     R: BufRead,
-    F: FnOnce(Cow<[u8]>) -> Result<T>,
+    F: FnOnce(Cow<'_, [u8]>) -> Result<T>,
 {
     let val;
     loop {
@@ -245,7 +245,7 @@ pub fn single_child<R, F, T>(
 ) -> Result<T>
 where
     R: BufRead,
-    F: FnMut(&mut Reader<R>, Tag) -> Result<T>,
+    F: FnMut(&mut Reader<R>, Tag<'_>) -> Result<T>,
 {
     let mut val = None;
     parse_children(reader, buf, |reader, t| {
@@ -262,7 +262,7 @@ where
 pub fn parse_children<R, F>(reader: &mut Reader<R>, buf: &mut Vec<u8>, mut f: F) -> Result<()>
 where
     R: BufRead,
-    F: FnMut(&mut Reader<R>, Tag) -> Result<()>,
+    F: FnMut(&mut Reader<R>, Tag<'_>) -> Result<()>,
 {
     unsafe {
         let ptr_buf: *mut Vec<u8> = buf;
@@ -289,19 +289,21 @@ pub fn parse_base<R, F>(
 ) -> Result<()>
 where
     R: BufRead,
-    F: FnMut(&mut Reader<R>, Tag) -> Result<()>,
+    F: FnMut(&mut Reader<R>, Tag<'_>) -> Result<()>,
 {
     unsafe {
         let ptr_buf: *mut Vec<u8> = buf;
         loop {
             buf.clear();
             match reader.read_event(buf)? {
-                Event::Start(start) => if start.name() == tag {
-                    let tag = Tag::new(start, ptr_buf);
-                    return f(reader, tag);
-                } else {
-                    return Err(Error::ElementNotFound);
-                },
+                Event::Start(start) => {
+                    if start.name() == tag {
+                        let tag = Tag::new(start, ptr_buf);
+                        return f(reader, tag);
+                    } else {
+                        return Err(Error::ElementNotFound);
+                    }
+                }
                 Event::Eof => return Err(Error::UnexpectedEndOfFile),
                 _ => {}
             }
@@ -311,7 +313,7 @@ where
 
 pub fn parse_attributes<'a, F>(tag: &BytesStart<'a>, mut f: F) -> Result<()>
 where
-    F: FnMut(&[u8], AttributeValue) -> Result<bool>,
+    F: FnMut(&[u8], AttributeValue<'_>) -> Result<bool>,
 {
     for attribute in tag.attributes() {
         let attribute = attribute?;
@@ -325,7 +327,7 @@ where
 
 pub fn optional_attribute_err<'a, F>(tag: &BytesStart<'a>, key: &[u8], mut f: F) -> Result<()>
 where
-    F: FnMut(Cow<str>) -> Result<()>,
+    F: FnMut(Cow<'_, str>) -> Result<()>,
 {
     parse_attributes(tag, |k, v| {
         if k == key {
@@ -339,7 +341,7 @@ where
 
 pub fn attribute_err<'a, F>(tag: &BytesStart<'a>, key: &[u8], mut f: F) -> Result<()>
 where
-    F: FnMut(Cow<str>) -> Result<()>,
+    F: FnMut(Cow<'_, str>) -> Result<()>,
 {
     let mut called = false;
     parse_attributes(tag, |k, v| {
@@ -360,7 +362,7 @@ where
 
 pub fn attribute<'a, F>(tag: &BytesStart<'a>, key: &[u8], mut f: F) -> Result<()>
 where
-    F: FnMut(Cow<str>),
+    F: FnMut(Cow<'_, str>),
 {
     attribute_err(tag, key, |t| {
         f(t);
diff --git a/src/run/run_metadata.rs b/src/run/run_metadata.rs
index 11a74f0..e270ba7 100644
--- a/src/run/run_metadata.rs
+++ b/src/run/run_metadata.rs
@@ -124,7 +124,7 @@ impl RunMetadata {
 
     /// Returns an iterator iterating over all the variables and their values
     /// that have been specified.
-    pub fn variables(&self) -> Iter<String, String> {
+    pub fn variables(&self) -> Iter<'_, String, String> {
         self.variables.iter()
     }
 
diff --git a/src/run/saver/livesplit.rs b/src/run/saver/livesplit.rs
index 84ba247..345b9b1 100644
--- a/src/run/saver/livesplit.rs
+++ b/src/run/saver/livesplit.rs
@@ -24,6 +24,8 @@
 //! livesplit::save_run(&run, writer).expect("Couldn't save the splits file");
 //! ```
 
+use crate::timing::formatter::{Complete, TimeFormatter};
+use crate::{Image, Run, Time, TimeSpan, Timer, TimerPhase};
 use byteorder::{WriteBytesExt, LE};
 use chrono::{DateTime, Utc};
 use quick_xml::events::{BytesDecl, BytesEnd, BytesStart, BytesText, Event};
@@ -33,8 +35,6 @@ use std::fmt::Display;
 use std::io::Write;
 use std::mem::replace;
 use std::result::Result as StdResult;
-use timing::formatter::{Complete, TimeFormatter};
-use {base64, Image, Run, Time, TimeSpan, Timer, TimerPhase};
 
 static LSS_IMAGE_HEADER: &[u8; 156] = include_bytes!("lss_image_header.bin");
 
@@ -53,11 +53,11 @@ quick_error! {
 /// The Result type for the LiveSplit Saver.
 pub type Result<T> = StdResult<T, Error>;
 
-fn new_tag(name: &[u8]) -> BytesStart {
+fn new_tag(name: &[u8]) -> BytesStart<'_> {
     BytesStart::borrowed(name, name.len())
 }
 
-fn write_start<W: Write>(writer: &mut Writer<W>, tag: BytesStart) -> Result<()> {
+fn write_start<W: Write>(writer: &mut Writer<W>, tag: BytesStart<'_>) -> Result<()> {
     writer.write_event(Event::Start(tag))?;
     Ok(())
 }
@@ -82,7 +82,7 @@ fn bool(value: bool) -> &'static [u8] {
     }
 }
 
-fn scoped<W, F>(writer: &mut Writer<W>, tag: BytesStart, is_empty: bool, scope: F) -> Result<()>
+fn scoped<W, F>(writer: &mut Writer<W>, tag: BytesStart<'_>, is_empty: bool, scope: F) -> Result<()>
 where
     W: Write,
     F: FnOnce(&mut Writer<W>) -> Result<()>,
@@ -100,7 +100,7 @@ where
 
 fn scoped_iter<W, F, I>(
     writer: &mut Writer<W>,
-    tag: BytesStart,
+    tag: BytesStart<'_>,
     iter: I,
     mut scope: F,
 ) -> Result<()>
@@ -118,7 +118,11 @@ where
     })
 }
 
-fn text<W: Write, T: AsRef<[u8]>>(writer: &mut Writer<W>, tag: BytesStart, text: T) -> Result<()> {
+fn text<W: Write, T: AsRef<[u8]>>(
+    writer: &mut Writer<W>,
+    tag: BytesStart<'_>,
+    text: T,
+) -> Result<()> {
     let text = text.as_ref();
     scoped(writer, tag, text.is_empty(), |writer| {
         writer.write_event(Event::Text(BytesText::from_plain(text)))?;
@@ -140,10 +144,10 @@ where
 
 fn image<W: Write>(
     writer: &mut Writer<W>,
-    tag: BytesStart,
+    tag: BytesStart<'_>,
     image: &Image,
     buf: &mut Vec<u8>,
-    image_buf: &mut Cow<[u8]>,
+    image_buf: &mut Cow<'_, [u8]>,
 ) -> Result<()> {
     let url = image.url();
     if url.starts_with("data:;base64,") {
@@ -184,7 +188,7 @@ fn fmt_buf<D: Display>(value: D, buf: &mut Vec<u8>) -> &[u8] {
 
 fn write_display<W: Write, D: Display>(
     writer: &mut Writer<W>,
-    tag: BytesStart,
+    tag: BytesStart<'_>,
     value: D,
     buf: &mut Vec<u8>,
 ) -> Result<()> {
@@ -193,7 +197,7 @@ fn write_display<W: Write, D: Display>(
 
 fn time_span<W: Write>(
     writer: &mut Writer<W>,
-    tag: BytesStart,
+    tag: BytesStart<'_>,
     time: TimeSpan,
     buf: &mut Vec<u8>,
 ) -> Result<()> {
@@ -214,7 +218,7 @@ fn time_inner<W: Write>(writer: &mut Writer<W>, time: Time, buf: &mut Vec<u8>) -
 
 fn time<W: Write>(
     writer: &mut Writer<W>,
-    tag: BytesStart,
+    tag: BytesStart<'_>,
     time: Time,
     buf: &mut Vec<u8>,
 ) -> Result<()> {
diff --git a/src/run/segment.rs b/src/run/segment.rs
index 028ad07..e79fdf7 100644
--- a/src/run/segment.rs
+++ b/src/run/segment.rs
@@ -1,6 +1,6 @@
-use comparison::personal_best;
+use crate::comparison::personal_best;
+use crate::{Image, SegmentHistory, Time, TimeSpan, TimingMethod};
 use std::collections::HashMap;
-use {Image, SegmentHistory, Time, TimeSpan, TimingMethod};
 
 /// A Segment describes a point in a speedrun that is suitable for storing a
 /// split time. This stores the name of that segment, an icon, the split times
diff --git a/src/run/segment_history.rs b/src/run/segment_history.rs
index 3adab30..cdaf086 100644
--- a/src/run/segment_history.rs
+++ b/src/run/segment_history.rs
@@ -1,6 +1,6 @@
+use crate::Time;
 use std::cmp::min;
 use std::slice::{Iter, IterMut};
-use Time;
 
 /// Stores the segment times achieved for a certain segment. Each segment is
 /// tagged with an index. Only segment times with an index larger than 0 are
@@ -89,7 +89,7 @@ impl SegmentHistory {
 
     /// Iterates over all the segment times and their indices.
     #[inline]
-    pub fn iter(&self) -> Iter<(i32, Time)> {
+    pub fn iter(&self) -> Iter<'_, (i32, Time)> {
         IntoIterator::into_iter(self)
     }
 
@@ -100,7 +100,7 @@ impl SegmentHistory {
     /// While you are allowed to change the indices, you need to ensure they
     /// stay in rising order.
     #[inline]
-    pub fn iter_mut(&mut self) -> IterMut<(i32, Time)> {
+    pub fn iter_mut(&mut self) -> IterMut<'_, (i32, Time)> {
         self.0.iter_mut()
     }
 
@@ -108,7 +108,7 @@ impl SegmentHistory {
     /// times created by route changes or other algorithmic changes are filtered
     /// out.
     #[inline]
-    pub fn iter_actual_runs(&self) -> Iter<(i32, Time)> {
+    pub fn iter_actual_runs(&self) -> Iter<'_, (i32, Time)> {
         let start = match self.get_pos(1) {
             Ok(pos) | Err(pos) => pos,
         };
diff --git a/src/settings/semantic_color.rs b/src/settings/semantic_color.rs
index df1133b..a426e27 100644
--- a/src/settings/semantic_color.rs
+++ b/src/settings/semantic_color.rs
@@ -1,5 +1,5 @@
 use super::Color;
-use layout;
+use crate::layout;
 
 /// A Semantic Color describes a color by some meaningful event that is
 /// happening. This information can be visualized as a color, but can also be
diff --git a/src/settings/value.rs b/src/settings/value.rs
index 561cb5d..5e26ca5 100644
--- a/src/settings/value.rs
+++ b/src/settings/value.rs
@@ -1,9 +1,9 @@
 use super::{Alignment, Color, Gradient, ListGradient};
-use component::splits::{ColumnStartWith, ColumnUpdateTrigger, ColumnUpdateWith};
-use hotkey::KeyCode;
+use crate::component::splits::{ColumnStartWith, ColumnUpdateTrigger, ColumnUpdateWith};
+use crate::hotkey::KeyCode;
+use crate::timing::formatter::{Accuracy, DigitsFormat};
+use crate::TimingMethod;
 use std::result::Result as StdResult;
-use timing::formatter::{Accuracy, DigitsFormat};
-use TimingMethod;
 
 /// Describes a setting's value. Such a value can be of a variety of different
 /// types.
diff --git a/src/timing/atomic_date_time.rs b/src/timing/atomic_date_time.rs
index 61be44e..1efeb9c 100644
--- a/src/timing/atomic_date_time.rs
+++ b/src/timing/atomic_date_time.rs
@@ -1,7 +1,7 @@
+use crate::platform::utc_now;
+use crate::TimeSpan;
 use chrono::{DateTime, Utc};
-use platform::utc_now;
 use std::ops::Sub;
-use TimeSpan;
 
 /// An Atomic Date Time represents a UTC Date Time that tries to be as close to
 /// an atomic clock as possible.
diff --git a/src/timing/formatter/accuracy.rs b/src/timing/formatter/accuracy.rs
index ea430d7..f87921d 100644
--- a/src/timing/formatter/accuracy.rs
+++ b/src/timing/formatter/accuracy.rs
@@ -36,7 +36,7 @@ pub struct FormattedSeconds {
 }
 
 impl Display for FormattedSeconds {
-    fn fmt(&self, f: &mut Formatter) -> Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
         let s = self.seconds as u8;
         if self.zero_prefix {
             write!(f, "{:02}", s)?;
diff --git a/src/timing/formatter/complete.rs b/src/timing/formatter/complete.rs
index 671ceae..1653479 100644
--- a/src/timing/formatter/complete.rs
+++ b/src/timing/formatter/complete.rs
@@ -1,6 +1,6 @@
 use super::{TimeFormatter, ASCII_MINUS};
+use crate::TimeSpan;
 use std::fmt::{Display, Formatter, Result};
-use TimeSpan;
 
 pub struct Inner(Option<TimeSpan>);
 
@@ -42,7 +42,7 @@ impl<'a> TimeFormatter<'a> for Complete {
 }
 
 impl Display for Inner {
-    fn fmt(&self, f: &mut Formatter) -> Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
         if let Some(time) = self.0 {
             let mut total_seconds = time.total_seconds();
             if total_seconds < 0.0 {
diff --git a/src/timing/formatter/days.rs b/src/timing/formatter/days.rs
index 2394275..7099bb0 100644
--- a/src/timing/formatter/days.rs
+++ b/src/timing/formatter/days.rs
@@ -1,6 +1,6 @@
 use super::{TimeFormatter, MINUS};
+use crate::TimeSpan;
 use std::fmt::{Display, Formatter, Result};
-use TimeSpan;
 
 pub struct Inner {
     time: Option<TimeSpan>,
@@ -41,7 +41,7 @@ impl<'a> TimeFormatter<'a> for Days {
 }
 
 impl Display for Inner {
-    fn fmt(&self, f: &mut Formatter) -> Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
         if let Some(time) = self.time {
             let mut total_seconds = time.total_seconds();
             if total_seconds < 0.0 {
diff --git a/src/timing/formatter/delta.rs b/src/timing/formatter/delta.rs
index a155dd2..82ca41b 100644
--- a/src/timing/formatter/delta.rs
+++ b/src/timing/formatter/delta.rs
@@ -1,6 +1,6 @@
 use super::{Accuracy, TimeFormatter, DASH, MINUS, PLUS};
+use crate::TimeSpan;
 use std::fmt::{Display, Formatter, Result};
-use TimeSpan;
 
 pub struct Inner {
     time: Option<TimeSpan>,
@@ -69,7 +69,7 @@ impl<'a> TimeFormatter<'a> for Delta {
 }
 
 impl Display for Inner {
-    fn fmt(&self, f: &mut Formatter) -> Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
         if let Some(time) = self.time {
             let mut total_seconds = time.total_seconds();
             if total_seconds < 0.0 {
diff --git a/src/timing/formatter/mod.rs b/src/timing/formatter/mod.rs
index 213f337..e400ef3 100644
--- a/src/timing/formatter/mod.rs
+++ b/src/timing/formatter/mod.rs
@@ -40,9 +40,9 @@ pub use self::possible_time_save::PossibleTimeSave;
 pub use self::regular::Regular;
 pub use self::short::Short;
 
+use crate::TimeSpan;
 use std::cmp::min;
 use std::fmt::Display;
-use TimeSpan;
 
 /// Time Formatters can be used to format optional Time Spans in various ways.
 pub trait TimeFormatter<'a> {
diff --git a/src/timing/formatter/none_wrapper.rs b/src/timing/formatter/none_wrapper.rs
index 7d9206a..74e5150 100644
--- a/src/timing/formatter/none_wrapper.rs
+++ b/src/timing/formatter/none_wrapper.rs
@@ -3,11 +3,11 @@
 //! changing its behavior when formatting empty times.
 
 use super::{TimeFormatter, DASH};
+use crate::TimeSpan;
 use std::fmt::{Display, Formatter, Result};
-use TimeSpan;
 
 /// A Time Span to be formatted by a None Wrapper.
-pub struct Inner<'a, F: 'a, S: 'a> {
+pub struct Inner<'a, F, S> {
     time: Option<TimeSpan>,
     wrapper: &'a NoneWrapper<F, S>,
 }
@@ -36,7 +36,6 @@ impl<'a, F: 'a + TimeFormatter<'a>, S: AsRef<str>> NoneWrapper<F, S> {
 
 impl DashWrapper {
     /// Creates a new Dash Wrapper.
-    #[allow(new_ret_no_self)]
     pub fn new<'a, F: 'a + TimeFormatter<'a>>(inner: F) -> NoneWrapper<F, &'static str> {
         NoneWrapper::new(inner, DASH)
     }
@@ -44,7 +43,6 @@ impl DashWrapper {
 
 impl EmptyWrapper {
     /// Creates a new Empty Wrapper.
-    #[allow(new_ret_no_self)]
     pub fn new<'a, F: 'a + TimeFormatter<'a>>(inner: F) -> NoneWrapper<F, &'static str> {
         NoneWrapper::new(inner, "")
     }
@@ -65,7 +63,7 @@ impl<'a, F: 'a + TimeFormatter<'a>, S: 'a + AsRef<str>> TimeFormatter<'a> for No
 }
 
 impl<'a, F: TimeFormatter<'a>, S: 'a + AsRef<str>> Display for Inner<'a, F, S> {
-    fn fmt(&self, f: &mut Formatter) -> Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
         if self.time.is_none() {
             write!(f, "{}", self.wrapper.1.as_ref())
         } else {
diff --git a/src/timing/formatter/possible_time_save.rs b/src/timing/formatter/possible_time_save.rs
index 538d5ed..0d09b6b 100644
--- a/src/timing/formatter/possible_time_save.rs
+++ b/src/timing/formatter/possible_time_save.rs
@@ -1,6 +1,6 @@
 use super::{Accuracy, TimeFormatter, DASH, MINUS};
+use crate::TimeSpan;
 use std::fmt::{Display, Formatter, Result};
-use TimeSpan;
 
 pub struct Inner {
     time: Option<TimeSpan>,
@@ -62,7 +62,7 @@ impl<'a> TimeFormatter<'a> for PossibleTimeSave {
 }
 
 impl Display for Inner {
-    fn fmt(&self, f: &mut Formatter) -> Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
         if let Some(time) = self.time {
             let mut total_seconds = time.total_seconds();
             if total_seconds < 0.0 {
diff --git a/src/timing/formatter/regular.rs b/src/timing/formatter/regular.rs
index 05414c0..08b35fd 100644
--- a/src/timing/formatter/regular.rs
+++ b/src/timing/formatter/regular.rs
@@ -1,6 +1,6 @@
 use super::{Accuracy, TimeFormatter, DASH, MINUS};
+use crate::TimeSpan;
 use std::fmt::{Display, Formatter, Result};
-use TimeSpan;
 
 pub struct Inner {
     time: Option<TimeSpan>,
@@ -63,7 +63,7 @@ impl<'a> TimeFormatter<'a> for Regular {
 }
 
 impl Display for Inner {
-    fn fmt(&self, f: &mut Formatter) -> Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
         if let Some(time) = self.time {
             let mut total_seconds = time.total_seconds();
             if total_seconds < 0.0 {
diff --git a/src/timing/formatter/short.rs b/src/timing/formatter/short.rs
index cef2fc8..9360dde 100644
--- a/src/timing/formatter/short.rs
+++ b/src/timing/formatter/short.rs
@@ -1,6 +1,6 @@
 use super::{Accuracy, TimeFormatter, MINUS};
+use crate::TimeSpan;
 use std::fmt::{Display, Formatter, Result};
-use TimeSpan;
 
 pub struct Inner {
     time: Option<TimeSpan>,
@@ -61,7 +61,7 @@ impl<'a> TimeFormatter<'a> for Short {
 }
 
 impl Display for Inner {
-    fn fmt(&self, f: &mut Formatter) -> Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
         if let Some(time) = self.time {
             let mut total_seconds = time.total_seconds();
             if total_seconds < 0.0 {
diff --git a/src/timing/formatter/timer.rs b/src/timing/formatter/timer.rs
index 85b1dcb..6aa2d2d 100644
--- a/src/timing/formatter/timer.rs
+++ b/src/timing/formatter/timer.rs
@@ -6,8 +6,8 @@ use super::{
     extract_hundredths, extract_milliseconds, extract_tenths, Accuracy, DigitsFormat,
     TimeFormatter, MINUS,
 };
+use crate::TimeSpan;
 use std::fmt::{Display, Formatter, Result};
-use TimeSpan;
 
 /// A Time Span to be formatted as the main part of the Time Formatter Pair.
 pub struct TimeInner {
@@ -67,7 +67,7 @@ impl<'a> TimeFormatter<'a> for Time {
 }
 
 impl Display for TimeInner {
-    fn fmt(&self, f: &mut Formatter) -> Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
         if let Some(time) = self.time {
             let mut total_seconds = time.total_seconds();
             if total_seconds < 0.0 {
@@ -163,7 +163,7 @@ impl<'a> TimeFormatter<'a> for Fraction {
 }
 
 impl Display for FractionInner {
-    fn fmt(&self, f: &mut Formatter) -> Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
         if let Some(time) = self.time {
             match self.accuracy {
                 Accuracy::Seconds => Ok(()),
diff --git a/src/timing/time.rs b/src/timing/time.rs
index 42ffdeb..8860bb1 100644
--- a/src/timing/time.rs
+++ b/src/timing/time.rs
@@ -1,5 +1,5 @@
+use crate::{TimeSpan, TimingMethod};
 use std::ops::{Add, AddAssign, Index, IndexMut, Sub, SubAssign};
-use {TimeSpan, TimingMethod};
 
 /// A time that can store a Real Time and a Game Time. Both of them are
 /// optional.
diff --git a/src/timing/time_span.rs b/src/timing/time_span.rs
index dab8fd7..055b462 100644
--- a/src/timing/time_span.rs
+++ b/src/timing/time_span.rs
@@ -1,5 +1,5 @@
+use crate::platform::Duration as StdDuration;
 use chrono::Duration;
-use platform::Duration as StdDuration;
 use std::num::ParseFloatError;
 use std::ops::{AddAssign, SubAssign};
 use std::str::FromStr;
@@ -139,7 +139,7 @@ struct TimeSpanVisitor;
 impl<'de> Visitor<'de> for TimeSpanVisitor {
     type Value = TimeSpan;
 
-    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+    fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
         formatter.write_str("a string containing a time")
     }
 
diff --git a/src/timing/time_stamp.rs b/src/timing/time_stamp.rs
index ddfb3a3..e976e99 100644
--- a/src/timing/time_stamp.rs
+++ b/src/timing/time_stamp.rs
@@ -1,6 +1,6 @@
-use platform::Instant;
+use crate::platform::Instant;
+use crate::TimeSpan;
 use std::ops::Sub;
-use TimeSpan;
 
 /// A Time Stamp stores a point in time, that can be used to calculate Time
 /// Spans.
diff --git a/src/timing/timer/mod.rs b/src/timing/timer/mod.rs
index e309d76..84c01bd 100644
--- a/src/timing/timer/mod.rs
+++ b/src/timing/timer/mod.rs
@@ -1,9 +1,9 @@
-use comparison::personal_best;
+use crate::comparison::personal_best;
+use crate::TimerPhase::*;
+use crate::{AtomicDateTime, Run, Segment, Time, TimeSpan, TimeStamp, TimerPhase, TimingMethod};
 use parking_lot::RwLock;
 use std::mem;
 use std::sync::Arc;
-use TimerPhase::*;
-use {AtomicDateTime, Run, Segment, Time, TimeSpan, TimeStamp, TimerPhase, TimingMethod};
 
 #[cfg(test)]
 mod tests;
@@ -180,13 +180,15 @@ impl Timer {
         let game_time = match self.phase {
             NotRunning => Some(self.run.offset()),
             Ended => self.run.segments().last().unwrap().split_time().game_time,
-            _ => if self.is_game_time_paused() {
-                self.game_time_pause_time
-            } else if self.is_game_time_initialized() {
-                catch! { real_time? - self.loading_times() }
-            } else {
-                None
-            },
+            _ => {
+                if self.is_game_time_paused() {
+                    self.game_time_pause_time
+                } else if self.is_game_time_initialized() {
+                    catch! { real_time? - self.loading_times() }
+                } else {
+                    None
+                }
+            }
         };
 
         Time::new()
@@ -254,9 +256,10 @@ impl Timer {
     /// current split. The attempt ends if the last split time is stored.
     pub fn split(&mut self) {
         let current_time = self.current_time();
-        if self.phase == Running && current_time
-            .real_time
-            .map_or(false, |t| t >= TimeSpan::zero())
+        if self.phase == Running
+            && current_time
+                .real_time
+                .map_or(false, |t| t >= TimeSpan::zero())
         {
             self.current_split_mut()
                 .unwrap()


Test patch:
diff --git a/src/analysis/tests/empty_run.rs b/src/analysis/tests/empty_run.rs
index c072eec..6d0e4ce 100644
--- a/src/analysis/tests/empty_run.rs
+++ b/src/analysis/tests/empty_run.rs
@@ -1,6 +1,6 @@
 use super::super::sum_of_segments::{calculate_best, calculate_worst};
 use super::super::total_playtime;
-use {Run, TimeSpan, TimingMethod};
+use crate::{Run, TimeSpan, TimingMethod};
 
 #[test]
 fn sum_of_best() {
diff --git a/src/comparison/latest_run.rs b/src/comparison/latest_run.rs
index 76dd2e5..d709b98 100644
--- a/src/comparison/latest_run.rs
+++ b/src/comparison/latest_run.rs
@@ -6,7 +6,7 @@
 //! furthest.
 
 use super::ComparisonGenerator;
-use {Attempt, Segment, TimeSpan, TimingMethod};
+use crate::{Attempt, Segment, TimeSpan, TimingMethod};
 
 /// The Comparison Generator for calculating the Latest Run. Using the
 /// Segment History, this comparison reconstructs the splits of the furthest,
diff --git a/src/comparison/tests/average.rs b/src/comparison/tests/average.rs
index e62258b..156eaae 100644
--- a/src/comparison/tests/average.rs
+++ b/src/comparison/tests/average.rs
@@ -1,6 +1,6 @@
-use comparison::average_segments::{AverageSegments, NAME};
-use tests_helper::run_with_splits;
-use {Run, Segment, TimeSpan, Timer};
+use crate::comparison::average_segments::{AverageSegments, NAME};
+use crate::tests_helper::run_with_splits;
+use crate::{Run, Segment, TimeSpan, Timer};
 
 #[test]
 fn test() {
diff --git a/src/comparison/tests/balanced_pb.rs b/src/comparison/tests/balanced_pb.rs
index 28b08c5..778164b 100644
--- a/src/comparison/tests/balanced_pb.rs
+++ b/src/comparison/tests/balanced_pb.rs
@@ -1,7 +1,7 @@
-use comparison::balanced_pb::{BalancedPB, NAME};
-use tests_helper::{run_with_splits, run_with_splits_opt};
-use timing::formatter::{Short, TimeFormatter};
-use {Run, Segment, TimeSpan, Timer};
+use crate::comparison::balanced_pb::{BalancedPB, NAME};
+use crate::tests_helper::{run_with_splits, run_with_splits_opt};
+use crate::timing::formatter::{Short, TimeFormatter};
+use crate::{Run, Segment, TimeSpan, Timer};
 
 #[test]
 fn test() {
diff --git a/src/comparison/tests/empty.rs b/src/comparison/tests/empty.rs
index eeda054..17d9d24 100644
--- a/src/comparison/tests/empty.rs
+++ b/src/comparison/tests/empty.rs
@@ -1,4 +1,4 @@
-use comparison::{self, ComparisonGenerator};
+use crate::comparison::{self, ComparisonGenerator};
 
 fn test<T: ComparisonGenerator>(mut generator: T) {
     generator.generate(&mut [], &[]);
diff --git a/src/comparison/tests/median.rs b/src/comparison/tests/median.rs
index f70aef3..d02dade 100644
--- a/src/comparison/tests/median.rs
+++ b/src/comparison/tests/median.rs
@@ -1,6 +1,6 @@
-use comparison::median_segments::{MedianSegments, NAME};
-use tests_helper::run_with_splits;
-use {Run, Segment, TimeSpan, Timer};
+use crate::comparison::median_segments::{MedianSegments, NAME};
+use crate::tests_helper::run_with_splits;
+use crate::{Run, Segment, TimeSpan, Timer};
 
 #[test]
 fn test() {
diff --git a/src/component/delta/tests.rs b/src/component/delta/tests.rs
index 72d8626..875382a 100644
--- a/src/component/delta/tests.rs
+++ b/src/component/delta/tests.rs
@@ -1,5 +1,5 @@
 use super::Component;
-use {GeneralLayoutSettings, Run, Segment, Timer};
+use crate::{GeneralLayoutSettings, Run, Segment, Timer};
 
 #[test]
 fn comparison_text() {
diff --git a/src/component/detailed_timer/tests.rs b/src/component/detailed_timer/tests.rs
index 356baed..d905356 100644
--- a/src/component/detailed_timer/tests.rs
+++ b/src/component/detailed_timer/tests.rs
@@ -1,5 +1,5 @@
 use super::{Component, Settings};
-use {Run, Segment, Timer};
+use crate::{Run, Segment, Timer};
 
 #[test]
 fn icon_handling() {
@@ -16,62 +16,48 @@ fn icon_handling() {
 
     let layout_settings = &Default::default();
 
-    assert!(
-        component
-            .state(&timer, layout_settings)
-            .icon_change
-            .filter(|s| s.is_empty())
-            .is_some()
-    );
+    assert!(component
+        .state(&timer, layout_settings)
+        .icon_change
+        .filter(|s| s.is_empty())
+        .is_some());
 
-    assert!(
-        component
-            .state(&timer, layout_settings)
-            .icon_change
-            .is_none()
-    );
+    assert!(component
+        .state(&timer, layout_settings)
+        .icon_change
+        .is_none());
 
     timer.start();
 
-    assert!(
-        component
-            .state(&timer, layout_settings)
-            .icon_change
-            .filter(|s| !s.is_empty())
-            .is_some()
-    );
+    assert!(component
+        .state(&timer, layout_settings)
+        .icon_change
+        .filter(|s| !s.is_empty())
+        .is_some());
 
-    assert!(
-        component
-            .state(&timer, layout_settings)
-            .icon_change
-            .is_none()
-    );
+    assert!(component
+        .state(&timer, layout_settings)
+        .icon_change
+        .is_none());
 
     timer.reset(true);
 
-    assert!(
-        component
-            .state(&timer, layout_settings)
-            .icon_change
-            .filter(|s| s.is_empty())
-            .is_some()
-    );
+    assert!(component
+        .state(&timer, layout_settings)
+        .icon_change
+        .filter(|s| s.is_empty())
+        .is_some());
 
-    assert!(
-        component
-            .state(&timer, layout_settings)
-            .icon_change
-            .is_none()
-    );
+    assert!(component
+        .state(&timer, layout_settings)
+        .icon_change
+        .is_none());
 
     component.remount();
 
-    assert!(
-        component
-            .state(&timer, layout_settings)
-            .icon_change
-            .filter(|s| s.is_empty())
-            .is_some()
-    );
+    assert!(component
+        .state(&timer, layout_settings)
+        .icon_change
+        .filter(|s| s.is_empty())
+        .is_some());
 }
diff --git a/src/component/splits/tests/column.rs b/src/component/splits/tests/column.rs
index 1d2edbb..31d4970 100644
--- a/src/component/splits/tests/column.rs
+++ b/src/component/splits/tests/column.rs
@@ -1,10 +1,13 @@
-use super::{ColumnSettings, ColumnStartWith, ColumnUpdateWith, ColumnUpdateTrigger, Component, Settings, State};
-use settings::SemanticColor::{
+use super::{
+    ColumnSettings, ColumnStartWith, ColumnUpdateTrigger, ColumnUpdateWith, Component, Settings,
+    State,
+};
+use crate::settings::SemanticColor::{
     self, AheadGainingTime as AheadGaining, BehindGainingTime as BehindGaining,
     BehindLosingTime as BehindLosing, BestSegment as Best, Default as Text,
 };
-use tests_helper::{run_with_splits_opt, start_run};
-use {Run, Segment, TimeSpan, Timer};
+use crate::tests_helper::{run_with_splits_opt, start_run};
+use crate::{Run, Segment, TimeSpan, Timer};
 
 type Values = &'static [([&'static str; 6], [SemanticColor; 6])];
 
@@ -1119,13 +1122,7 @@ fn column_delta_best_segment_colors() {
     // Set best segment times, but no PB time
     run_with_splits_opt(
         &mut timer,
-        &[
-            Some(5.0),
-            Some(8.0),
-            Some(12.0),
-            None,
-            Some(20.0),
-        ],
+        &[Some(5.0), Some(8.0), Some(12.0), None, Some(20.0)],
     );
 
     start_run(&mut timer);
diff --git a/src/component/splits/tests/mod.rs b/src/component/splits/tests/mod.rs
index 2c24265..a866df0 100644
--- a/src/component/splits/tests/mod.rs
+++ b/src/component/splits/tests/mod.rs
@@ -2,7 +2,7 @@ use super::{
     ColumnSettings, ColumnStartWith, ColumnUpdateTrigger, ColumnUpdateWith, Component, Settings,
     State,
 };
-use {Run, Segment, TimeSpan, Timer, TimingMethod};
+use crate::{Run, Segment, TimeSpan, Timer, TimingMethod};
 
 pub mod column;
 
diff --git a/src/component/title/tests.rs b/src/component/title/tests.rs
index e33e682..2be9381 100644
--- a/src/component/title/tests.rs
+++ b/src/component/title/tests.rs
@@ -1,5 +1,5 @@
 use super::{Component, Settings};
-use {Run, Segment, Timer};
+use crate::{Run, Segment, Timer};
 
 #[test]
 fn finished_runs_and_attempt_count() {
diff --git a/src/run/editor/tests/dissociate_run.rs b/src/run/editor/tests/dissociate_run.rs
index 8117f27..4cc3de9 100644
--- a/src/run/editor/tests/dissociate_run.rs
+++ b/src/run/editor/tests/dissociate_run.rs
@@ -1,5 +1,5 @@
 use super::super::Editor;
-use {Run, Segment};
+use crate::{Run, Segment};
 
 fn base() -> Editor {
     let mut run = Run::new();
diff --git a/src/run/editor/tests/mark_as_modified.rs b/src/run/editor/tests/mark_as_modified.rs
index c66ff46..9630314 100644
--- a/src/run/editor/tests/mark_as_modified.rs
+++ b/src/run/editor/tests/mark_as_modified.rs
@@ -1,5 +1,5 @@
 use super::super::Editor;
-use {Run, Segment, TimingMethod};
+use crate::{Run, Segment, TimingMethod};
 
 fn base() -> Editor {
     let mut run = Run::new();
diff --git a/src/run/editor/tests/mod.rs b/src/run/editor/tests/mod.rs
index 40325c8..4c1c182 100644
--- a/src/run/editor/tests/mod.rs
+++ b/src/run/editor/tests/mod.rs
@@ -1,5 +1,5 @@
 use super::Editor;
-use {Run, Segment};
+use crate::{Run, Segment};
 
 mod dissociate_run;
 mod mark_as_modified;
diff --git a/src/run/tests/empty_run.rs b/src/run/tests/empty_run.rs
index 4068632..319dad1 100644
--- a/src/run/tests/empty_run.rs
+++ b/src/run/tests/empty_run.rs
@@ -1,4 +1,4 @@
-use Run;
+use crate::Run;
 
 #[test]
 #[should_panic(expected = "Can't calculate the minimum segment history index for an empty Run.")]
diff --git a/src/tests_helper.rs b/src/tests_helper.rs
index 0c70c3f..8c7f745 100644
--- a/src/tests_helper.rs
+++ b/src/tests_helper.rs
@@ -1,4 +1,4 @@
-use {TimeSpan, Timer, TimingMethod};
+use crate::{TimeSpan, Timer, TimingMethod};
 
 pub(crate) fn start_run(timer: &mut Timer) {
     timer.set_current_timing_method(TimingMethod::GameTime);
diff --git a/src/timing/timer/tests/mark_as_modified.rs b/src/timing/timer/tests/mark_as_modified.rs
index c3b409f..6c02358 100644
--- a/src/timing/timer/tests/mark_as_modified.rs
+++ b/src/timing/timer/tests/mark_as_modified.rs
@@ -1,4 +1,4 @@
-use {Timer, Run, Segment, TimingMethod, TimeSpan};
+use crate::{Run, Segment, TimeSpan, Timer, TimingMethod};
 
 fn timer() -> Timer {
     use super::timer;
diff --git a/src/timing/timer/tests/mod.rs b/src/timing/timer/tests/mod.rs
index 6fdece8..d8677e2 100644
--- a/src/timing/timer/tests/mod.rs
+++ b/src/timing/timer/tests/mod.rs
@@ -1,6 +1,6 @@
-use run::Editor;
-use tests_helper::{run_with_splits, run_with_splits_opt, start_run};
-use {Run, Segment, TimeSpan, Timer, TimerPhase, TimingMethod};
+use crate::run::Editor;
+use crate::tests_helper::{run_with_splits, run_with_splits_opt, start_run};
+use crate::{Run, Segment, TimeSpan, Timer, TimerPhase, TimingMethod};
 
 mod mark_as_modified;
 
diff --git a/tests/balanced_pb.rs b/tests/balanced_pb.rs
index 4487b12..25ad49e 100644
--- a/tests/balanced_pb.rs
+++ b/tests/balanced_pb.rs
@@ -1,5 +1,3 @@
-extern crate livesplit_core;
-
 use livesplit_core::comparison::balanced_pb::{BalancedPB, NAME};
 use livesplit_core::run::parser::livesplit;
 use livesplit_core::{Time, TimeSpan};
diff --git a/tests/escaped_lss.rs b/tests/escaped_lss.rs
index 7583171..3dfd8a7 100644
--- a/tests/escaped_lss.rs
+++ b/tests/escaped_lss.rs
@@ -1,6 +1,3 @@
-extern crate livesplit_core;
-extern crate memmem;
-
 use livesplit_core::run::{parser, saver};
 use livesplit_core::{Run, Segment};
 use memmem::{Searcher, TwoWaySearcher};
diff --git a/tests/parsing.rs b/tests/parsing.rs
index f0f7897..f1bac61 100644
--- a/tests/parsing.rs
+++ b/tests/parsing.rs
@@ -1,5 +1,3 @@
-extern crate livesplit_core;
-
 mod parse {
     use livesplit_core::run::parser::{
         composite, flitter, livesplit, llanfair, llanfair2, llanfair_gered, portal2_live_timer,
diff --git a/tests/run.rs b/tests/run.rs
index 52c47af..aada3a6 100644
--- a/tests/run.rs
+++ b/tests/run.rs
@@ -1,5 +1,3 @@
-extern crate livesplit_core;
-
 mod run {
     use livesplit_core::run::ComparisonError;
     use livesplit_core::Run;