diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-12-21 15:08:10 -0500 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-12-21 15:08:52 -0500 |
| commit | 909cf65c97ef2ec56090559293f6619dbd1e9f1f (patch) | |
| tree | 855b195db502f0451fabefcac39be8bd898a3629 /src/routes | |
| parent | 4117f797cec89927fe3363543b8c8b11a311b90c (diff) | |
| download | august-offensive-909cf65c97ef2ec56090559293f6619dbd1e9f1f.tar.gz august-offensive-909cf65c97ef2ec56090559293f6619dbd1e9f1f.tar.bz2 august-offensive-909cf65c97ef2ec56090559293f6619dbd1e9f1f.zip | |
Adopt Rust 2018 edition with idiomatic changes
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/callback.rs | 4 | ||||
| -rw-r--r-- | src/routes/format_msg.rs | 4 | ||||
| -rw-r--r-- | src/routes/mod.rs | 2 | ||||
| -rw-r--r-- | src/routes/not_understood.rs | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/routes/callback.rs b/src/routes/callback.rs index 4a258ae..8c07166 100644 --- a/src/routes/callback.rs +++ b/src/routes/callback.rs @@ -1,4 +1,4 @@ -use routes::*; +use crate::routes::*; // Sends Callback message with information from HttpRequest. pub fn callback(req: HttpRequest, query: Query<HashMap<String, String>>) -> JsonMessage<Callback> { @@ -17,7 +17,7 @@ pub fn callback(req: HttpRequest, query: Query<HashMap<String, String>>) -> Json #[cfg(test)] mod tests { use super::*; - use routes::tests::*; + use crate::routes::tests::*; use actix_web::http::Method; #[test] diff --git a/src/routes/format_msg.rs b/src/routes/format_msg.rs index d7a6f05..83dbd8f 100644 --- a/src/routes/format_msg.rs +++ b/src/routes/format_msg.rs @@ -39,8 +39,8 @@ impl<T: Serialize> Responder for FormatMsg<T> { #[cfg(test)] mod tests { use super::*; - use routes::*; - use routes::tests::*; + use crate::routes::*; + use crate::routes::tests::*; use serde::ser::{Error, Serializer}; #[test] diff --git a/src/routes/mod.rs b/src/routes/mod.rs index 759375d..ac11ad9 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -1,6 +1,6 @@ use actix_web::{web::{route, scope, Query}, HttpRequest, Result, Scope}; use actix_web::http::StatusCode; -use messages::*; +use crate::messages::*; use std::collections::HashMap; pub mod format_msg; diff --git a/src/routes/not_understood.rs b/src/routes/not_understood.rs index 4e30361..7ca5ed2 100644 --- a/src/routes/not_understood.rs +++ b/src/routes/not_understood.rs @@ -1,4 +1,4 @@ -use routes::*; +use crate::routes::*; // Sends a default response message when requested an undefined resource. pub fn not_understood(req: HttpRequest) -> JsonMessage<NotUnderstood> { @@ -15,7 +15,7 @@ pub fn not_understood(req: HttpRequest) -> JsonMessage<NotUnderstood> { #[cfg(test)] mod tests { use super::*; - use routes::tests::*; + use crate::routes::tests::*; #[test] fn test_not_understood() { |
