summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliv <liv@fastmail.com>2019-01-09 20:07:19 +0100
committerliv <liv@fastmail.com>2019-01-09 20:07:19 +0100
commita0d21020dfd442c93d057a00627ec66fa72317eb (patch)
treeac6de3620c3f19ab9f287f633bd2bd1db4e44cb9
parent1bb5df9dd2edf0a82c1f2399bc45305a6b713c16 (diff)
update for rust 2018
-rw-r--r--Cargo.toml1
-rw-r--r--src/main.rs12
2 files changed, 3 insertions, 10 deletions
diff --git a/Cargo.toml b/Cargo.toml
index c1f81fd..5fe7438 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,6 +2,7 @@
name = "rustlings"
version = "0.1.0"
authors = ["olivia <olivia@fastmail.com>"]
+edition = "2018"
[dependencies]
clap = "2.32.0"
diff --git a/src/main.rs b/src/main.rs
index 3cdd0b4..7187c03 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,21 +1,13 @@
-#[macro_use]
-extern crate clap;
-extern crate console;
-extern crate indicatif;
-extern crate syntect;
-extern crate notify;
-
-use clap::{App, Arg, SubCommand};
+use clap::{App, Arg, SubCommand, crate_version};
use console::{style, Emoji};
use indicatif::ProgressBar;
use syntect::easy::HighlightFile;
use syntect::parsing::SyntaxSet;
use syntect::highlighting::{ThemeSet, Style};
-use syntect::util::{as_24_bit_terminal_escaped, LinesWithEndings};
+use syntect::util::{as_24_bit_terminal_escaped};
use std::fs::remove_file;
use std::io::BufRead;
use std::process::Command;
-use std::fs::read_to_string;
use std::sync::mpsc::channel;
use std::time::Duration;
use notify::DebouncedEvent;