diff --git a/Cargo.toml b/Cargo.toml index 69e55cc..6a85e2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "liftinstall" version = "0.2.0" +edition = "2018" authors = ["James "] repository = "https://github.com/j-selby/liftinstall.git" documentation = "https://liftinstall.jselby.net" diff --git a/src/config.rs b/src/config.rs index e5ac346..94123c7 100644 --- a/src/config.rs +++ b/src/config.rs @@ -7,8 +7,8 @@ use toml::de::Error as TomlError; use serde_json::{self, Error as SerdeError}; -use sources::get_by_name; -use sources::types::Release; +use crate::sources::get_by_name; +use crate::sources::types::Release; /// Description of the source of a package. #[derive(Debug, Deserialize, Serialize, Clone)] diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs index a09c49f..056035d 100644 --- a/src/frontend/mod.rs +++ b/src/frontend/mod.rs @@ -4,8 +4,8 @@ use std::sync::{Arc, RwLock}; -use installer::InstallerFramework; -use logging::LoggingErrors; +use crate::installer::InstallerFramework; +use crate::logging::LoggingErrors; pub mod rest; mod ui; diff --git a/src/frontend/rest/assets.rs b/src/frontend/rest/assets.rs index 66090c3..0b5d988 100644 --- a/src/frontend/rest/assets.rs +++ b/src/frontend/rest/assets.rs @@ -2,8 +2,8 @@ extern crate mime_guess; -use self::mime_guess::mime::APPLICATION_OCTET_STREAM; use self::mime_guess::from_ext; +use self::mime_guess::mime::APPLICATION_OCTET_STREAM; macro_rules! include_files_as_assets { ( $target_match:expr, $( $file_name:expr ),* ) => { diff --git a/src/frontend/rest/server.rs b/src/frontend/rest/server.rs index e970763..cd27400 100644 --- a/src/frontend/rest/server.rs +++ b/src/frontend/rest/server.rs @@ -2,11 +2,11 @@ //! //! Contains the over-arching server object + methods to manipulate it. -use frontend::rest::services::WebService; +use crate::frontend::rest::services::WebService; -use installer::InstallerFramework; +use crate::installer::InstallerFramework; -use logging::LoggingErrors; +use crate::logging::LoggingErrors; use hyper::server::Http; diff --git a/src/frontend/rest/services/attributes.rs b/src/frontend/rest/services/attributes.rs index 0ef61d9..4b48a6d 100644 --- a/src/frontend/rest/services/attributes.rs +++ b/src/frontend/rest/services/attributes.rs @@ -2,23 +2,23 @@ //! //! The /api/attr call returns an executable script containing session variables. -use frontend::rest::services::default_future; -use frontend::rest::services::Future; -use frontend::rest::services::Request; -use frontend::rest::services::Response; -use frontend::rest::services::WebService; +use crate::frontend::rest::services::default_future; +use crate::frontend::rest::services::Future; +use crate::frontend::rest::services::Request; +use crate::frontend::rest::services::Response; +use crate::frontend::rest::services::WebService; use hyper::header::{ContentLength, ContentType}; -use logging::LoggingErrors; +use crate::logging::LoggingErrors; pub fn handle(service: &WebService, _req: Request) -> Future { let framework = service.get_framework_read(); let file = framework - .base_attributes - .to_json_str() - .log_expect("Failed to render JSON representation of config"); + .base_attributes + .to_json_str() + .log_expect("Failed to render JSON representation of config"); default_future( Response::new() diff --git a/src/frontend/rest/services/config.rs b/src/frontend/rest/services/config.rs index e742493..550a5d3 100644 --- a/src/frontend/rest/services/config.rs +++ b/src/frontend/rest/services/config.rs @@ -4,18 +4,18 @@ //! //! This endpoint should be usable directly from a