diff --git a/Cargo.lock b/Cargo.lock index 4af38bc..7ae8241 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -284,13 +284,13 @@ dependencies = [ "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.15 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.8.3 (registry+https://github.com/rust-lang/crates.io-index)", "nfd 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "number_prefix 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_macros 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-embed 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -353,8 +353,8 @@ version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -364,8 +364,8 @@ version = "2.0.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -513,33 +513,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "phf" -version = "0.7.21" +version = "0.7.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "phf_codegen" -version = "0.7.21" +version = "0.7.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_generator 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "phf_generator" -version = "0.7.21" +version = "0.7.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_macros" +version = "0.7.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_generator 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "phf_shared" -version = "0.7.21" +version = "0.7.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -570,6 +579,16 @@ dependencies = [ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "redox_syscall" version = "0.1.37" @@ -623,30 +642,11 @@ dependencies = [ "uuid 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rust-embed" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "safemem" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "same-file" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "schannel" version = "0.1.10" @@ -960,15 +960,6 @@ name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "walkdir" -version = "2.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "web-view" version = "0.1.2" @@ -1090,22 +1081,22 @@ dependencies = [ "checksum openssl 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)" = "169a4b9160baf9b9b1ab975418c673686638995ba921683a7f1e01470dcb8854" "checksum openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "14ba54ac7d5a4eabd1d5f2c1fdeb7e7c14debfa669d94b983d01b465e767ba9e" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc" -"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f" -"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03" -"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2" +"checksum phf 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)" = "7d37a244c75a9748e049225155f56dbcb98fe71b192fd25fd23cb914b5ad62f2" +"checksum phf_codegen 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)" = "4e4048fe7dd7a06b8127ecd6d3803149126e9b33c7558879846da3a63f734f2b" +"checksum phf_generator 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)" = "05a079dd052e7b674d21cb31cbb6c05efd56a2cd2827db7692e2f1a507ebd998" +"checksum phf_macros 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6cfe846605e58552e1324c566bfb5bd5ac032245c9ae05c859f042e81c03b5" +"checksum phf_shared 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)" = "c2261d544c2bb6aa3b10022b0be371b9c7c64f762ef28c6f5d4f1ef6d97b5930" "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" "checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" "checksum rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)" = "512870020642bb8c221bf68baa1b2573da814f6ccfe5c9699b1c303047abe9b1" +"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" "checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" "checksum regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "744554e01ccbd98fff8c457c3b092cd67af62a555a43bfe97ae8a0451f7799fa" "checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" "checksum relay 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f301bafeb60867c85170031bdb2fcf24c8041f33aee09e7b116a58d4e9f781c5" "checksum reqwest 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "449c45f593ce9af9417c91e22f274fb8cea013bcf3d37ec1b5fb534b623bc708" -"checksum rust-embed 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "399b86082734a2ce9f80a58377431da7f4f57712d9947cf9036d93c8098d2b79" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" -"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637" "checksum schannel 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "acece75e0f987c48863a6c792ec8b7d6c4177d4a027f8ccc72f849794f437016" "checksum scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f417c22df063e9450888a7561788e9bd46d3bb3c1466435b4eccb903807f147d" "checksum security-framework 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "dfa44ee9c54ce5eecc9de7d5acbad112ee58755239381f687e564004ba4a2332" @@ -1145,7 +1136,6 @@ dependencies = [ "checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b" "checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369" "checksum web-view 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "92f76092d2f039a4989ea946e195366dae806bdeb9be01779af2b96c3cffb90d" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3" diff --git a/Cargo.toml b/Cargo.toml index 778be2e..4e6c1ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,8 +19,8 @@ url = "*" reqwest = "0.8.4" number_prefix = "0.2.7" -rust-embed = "1.1.1" -log = "*" # Used by rust-embed's macros +phf = "0.7.22" +phf_macros = "0.7.22" serde = "1.0.27" serde_derive = "1.0.27" diff --git a/README.md b/README.md index 7f77d53..8a6cbc1 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Add your logo to `static/img/logo.png`, modify the configuration file, then run: cargo build ``` -LiftInstall should build on both Stable and Nightly Rust. +LiftInstall should build on both ~~Stable and~~ Nightly Rust. Contributing ------------ diff --git a/src/assets.rs b/src/assets.rs index 23a0327..75155ae 100644 --- a/src/assets.rs +++ b/src/assets.rs @@ -3,9 +3,26 @@ extern crate mime_guess; use assets::mime_guess::{get_mime_type, octet_stream}; -#[derive(RustEmbed)] -#[folder("static/")] -struct Assets; +macro_rules! include_files_as_assets { + ( $field_name:ident, $( $file_name:expr ),* ) => { + static $field_name: phf::Map<&'static str, &'static [u8]> = phf_map!( + $( + $file_name => include_bytes!(concat!("../static/", $file_name)), + )* + ); + } +} + +include_files_as_assets!( + ASSETS, + "/index.html", + "/css/bulma.css", + "/css/main.css", + "/img/logo.png", + "/js/helpers.js", + "/js/vue.js", + "/js/vue.min.js" +); /// Returns a static file based upon a given String as a Path. /// @@ -22,5 +39,5 @@ pub fn file_from_string(file_path: &str) -> Option<(String, Vec)> { let string_mime = guessed_mime.to_string(); - Some((string_mime, Assets::get(file_path)?)) + Some((string_mime, (*ASSETS.get(file_path)?).to_owned())) } diff --git a/src/config.rs b/src/config.rs index 737d764..66cd79f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,20 +1,20 @@ /// config.rs /// /// Contains Config structures, as well as means of serialising them. - use toml; use toml::de::Error as TomlError; use serde_json::{self, Error as SerdeError}; -use sources::types::Release; use sources::get_by_name; +use sources::types::Release; /// Description of the source of a package. #[derive(Debug, Deserialize, Serialize, Clone)] pub struct PackageSource { pub name: String, - #[serde(rename = "match")] pub match_regex: String, + #[serde(rename = "match")] + pub match_regex: String, pub config: toml::Value, } diff --git a/src/http.rs b/src/http.rs index 110558a..4c75630 100644 --- a/src/http.rs +++ b/src/http.rs @@ -1,7 +1,6 @@ /// http.rs /// /// A simple wrapper around Hyper's HTTP client. - use hyper::header::ContentLength; use reqwest; diff --git a/src/installer.rs b/src/installer.rs index 48cf838..6551fdd 100644 --- a/src/installer.rs +++ b/src/installer.rs @@ -1,7 +1,6 @@ /// installer.rs /// /// Contains the main installer structure, as well as high-level means of controlling it. - use regex::Regex; use zip::ZipArchive; @@ -14,20 +13,20 @@ use std::fs::create_dir_all; use std::fs::read_dir; use std::fs::File; +use std::env::consts::OS; +use std::env::current_exe; use std::env::home_dir; use std::env::var; -use std::env::current_exe; -use std::env::consts::OS; use std::path::Path; use std::path::PathBuf; -use std::io::Cursor; use std::io::copy; +use std::io::Cursor; +use std::sync::mpsc::Sender; use std::sync::Arc; use std::sync::Mutex; -use std::sync::mpsc::Sender; use config::Config; @@ -50,7 +49,7 @@ pub struct InstallerFramework { config: Config, database: Vec, install_path: Option, - preexisting_install: bool + preexisting_install: bool, } /// Contains basic properties on the status of the session. Subset of InstallationFramework. @@ -58,7 +57,7 @@ pub struct InstallerFramework { pub struct InstallationStatus { database: Vec, install_path: Option, - preexisting_install: bool + preexisting_install: bool, } /// Used to track the amount of data that has been downloaded during a HTTP request. @@ -102,12 +101,12 @@ impl InstallerFramework { &mut self, items: Vec, messages: &Sender, - fresh_install: bool + fresh_install: bool, ) -> Result<(), String> { // We have to have a install path for us to be able to do anything let path = match self.install_path.clone() { Some(v) => v, - None => return Err(format!("No install directory for installer")) + None => return Err(format!("No install directory for installer")), }; println!("Framework: Installing {:?} to {:?}", items, path); @@ -366,8 +365,7 @@ impl InstallerFramework { let new_app = path.join(platform_extension); let mut file_metadata = OpenOptions::new(); - file_metadata.write(true) - .create_new(true); + file_metadata.write(true).create_new(true); #[cfg(unix)] { @@ -394,7 +392,7 @@ impl InstallerFramework { // We have to have a install path for us to be able to do anything let path = match self.install_path.clone() { Some(v) => v, - None => return Err(format!("No install directory for installer")) + None => return Err(format!("No install directory for installer")), }; let metadata_path = path.join("metadata.json"); @@ -413,7 +411,7 @@ impl InstallerFramework { /// Configures this installer to install to the specified location. /// If there was a currently configured install path, this will be left as-is. - pub fn set_install_dir(&mut self, dir : &str) { + pub fn set_install_dir(&mut self, dir: &str) { self.install_path = Some(Path::new(dir).to_owned()); } @@ -423,9 +421,9 @@ impl InstallerFramework { database: self.database.clone(), install_path: match self.install_path.clone() { Some(v) => Some(v.display().to_string()), - None => None + None => None, }, - preexisting_install: self.preexisting_install + preexisting_install: self.preexisting_install, } } @@ -433,15 +431,15 @@ impl InstallerFramework { pub fn new(config: Config) -> Self { InstallerFramework { config, - database : Vec::new(), - install_path : None, - preexisting_install : false + database: Vec::new(), + install_path: None, + preexisting_install: false, } } /// Creates a new instance of the Installer Framework with a specified Config, managing /// a pre-existing installation. - pub fn new_with_db(config: Config, install_path : &Path) -> Result { + pub fn new_with_db(config: Config, install_path: &Path) -> Result { let path = install_path.to_owned(); let metadata_path = path.join("metadata.json"); let metadata_file = match File::open(metadata_path) { @@ -449,7 +447,7 @@ impl InstallerFramework { Err(v) => return Err(format!("Unable to open file handle: {:?}", v)), }; - let database : Vec = match serde_json::from_reader(metadata_file) { + let database: Vec = match serde_json::from_reader(metadata_file) { Ok(v) => v, Err(v) => return Err(format!("Unable to read metadata file: {:?}", v)), }; @@ -457,8 +455,8 @@ impl InstallerFramework { Ok(InstallerFramework { config, database, - install_path : Some(path), - preexisting_install : true + install_path: Some(path), + preexisting_install: true, }) } } diff --git a/src/main.rs b/src/main.rs index 21720d8..9a85437 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,7 @@ #![windows_subsystem = "windows"] -#![feature(attr_literals)] +#![feature(extern_prelude)] +#![feature(plugin)] +#![plugin(phf_macros)] extern crate web_view; @@ -11,10 +13,7 @@ extern crate tokio_core; extern crate number_prefix; extern crate reqwest; -#[macro_use] -extern crate rust_embed; -#[macro_use] -extern crate log; +extern crate phf; extern crate serde; #[macro_use] @@ -28,11 +27,11 @@ extern crate semver; extern crate zip; mod assets; -mod rest; mod config; -mod installer; -mod sources; mod http; +mod installer; +mod rest; +mod sources; use web_view::*; diff --git a/src/rest.rs b/src/rest.rs index ba83379..a20a0a4 100644 --- a/src/rest.rs +++ b/src/rest.rs @@ -9,36 +9,35 @@ use self::nfd::Response as NfdResponse; use serde_json; -use futures::Stream; -use futures::Future; use futures::future; +use futures::Future; use futures::Sink; +use futures::Stream; -use hyper::{self, Error as HyperError, Get, Post, StatusCode}; use hyper::header::{ContentLength, ContentType}; use hyper::server::{Http, Request, Response, Service}; +use hyper::{self, Error as HyperError, Get, Post, StatusCode}; use self::url::form_urlencoded; +use std::collections::HashMap; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; -use std::thread::{self, JoinHandle}; use std::process::exit; +use std::sync::mpsc::channel; use std::sync::Arc; use std::sync::RwLock; -use std::sync::mpsc::channel; -use std::collections::HashMap; +use std::thread::{self, JoinHandle}; use assets; -use installer::InstallerFramework; use installer::InstallMessage; +use installer::InstallerFramework; #[derive(Serialize)] struct FileSelection { path: Option, } - /// Acts as a communication mechanism between the Hyper WebService and the rest of the /// application. pub struct WebServer { @@ -108,10 +107,8 @@ impl Service for WebService { (&Get, "/api/config") => { let framework = self.framework.read().unwrap(); - let file = enscapsulate_json( - "config", - &framework.get_config().to_json_str().unwrap(), - ); + let file = + enscapsulate_json("config", &framework.get_config().to_json_str().unwrap()); Response::::new() .with_header(ContentLength(file.len() as u64)) diff --git a/src/sources/github/mod.rs b/src/sources/github/mod.rs index 7ce2c6d..16435d1 100644 --- a/src/sources/github/mod.rs +++ b/src/sources/github/mod.rs @@ -1,14 +1,13 @@ /// github/mod.rs - use futures::{Future, Stream}; use tokio_core::reactor::Core; +use hyper::header::UserAgent; use hyper::Client; -use hyper::Uri; use hyper::Method; use hyper::Request; -use hyper::header::UserAgent; +use hyper::Uri; use hyper_tls::HttpsConnector; diff --git a/src/sources/mod.rs b/src/sources/mod.rs index d3a0533..857462d 100644 --- a/src/sources/mod.rs +++ b/src/sources/mod.rs @@ -1,7 +1,6 @@ /// sources/mod.rs /// /// Contains backends to various release distribution services. - pub mod types; pub mod github; diff --git a/src/sources/types.rs b/src/sources/types.rs index 8847e28..557c242 100644 --- a/src/sources/types.rs +++ b/src/sources/types.rs @@ -1,7 +1,6 @@ /// types.rs /// /// Contains traits that should be implemented by sources, as well as corresponding types. - use std::cmp::Ordering; pub use semver::Version as SemverVersion;