Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Commit e77ea7a

Browse files
committed
feat(code): update to rust 2018
1 parent e8e185c commit e77ea7a

File tree

31 files changed

+108
-83
lines changed

31 files changed

+108
-83
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "fxa_email_service"
33
version = "1.126.0"
44
publish = false
5+
edition = "2018"
56

67
[[bin]]
78
name = "fxa_email_send"

src/api/healthcheck/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ use rocket::State;
1313
use rocket_contrib::Json;
1414
use serde_json;
1515

16-
use settings::Settings;
17-
use types::error::AppResult;
16+
use crate::{settings::Settings, types::error::AppResult};
1817

1918
#[cfg(test)]
2019
mod test;

src/api/healthcheck/test.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ use std::env;
77
use rocket::{self, http::Status, local::Client};
88
use serde_json::{self, Value};
99

10-
use db::{auth_db::DbClient, delivery_problems::DeliveryProblems, message_data::MessageData};
11-
use logging::MozlogLogger;
12-
use providers::Providers;
13-
use settings::Settings;
10+
use crate::{
11+
db::{auth_db::DbClient, delivery_problems::DeliveryProblems, message_data::MessageData},
12+
logging::MozlogLogger,
13+
providers::Providers,
14+
settings::Settings,
15+
};
1416

1517
fn setup() -> Client {
1618
let settings = Settings::new().unwrap();

src/api/send/mod.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ use rocket::{
1212
};
1313
use rocket_contrib::Json;
1414

15-
use db::{auth_db::DbClient, delivery_problems::DeliveryProblems, message_data::MessageData};
16-
use logging::MozlogLogger;
17-
use providers::{Headers, Providers};
18-
use types::{
19-
email_address::EmailAddress,
20-
error::{AppError, AppErrorKind, AppResult},
15+
use crate::{
16+
db::{auth_db::DbClient, delivery_problems::DeliveryProblems, message_data::MessageData},
17+
logging::MozlogLogger,
18+
providers::{Headers, Providers},
19+
types::{
20+
email_address::EmailAddress,
21+
error::{AppError, AppErrorKind, AppResult},
22+
},
2123
};
2224

2325
#[cfg(test)]

src/api/send/test.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ use rocket::{
77
local::Client,
88
};
99

10-
use db::{auth_db::DbClient, delivery_problems::DeliveryProblems, message_data::MessageData};
11-
use logging::MozlogLogger;
12-
use providers::Providers;
13-
use settings::Settings;
14-
use types::error::{AppError, AppErrorKind};
10+
use crate::{
11+
db::{auth_db::DbClient, delivery_problems::DeliveryProblems, message_data::MessageData},
12+
logging::MozlogLogger,
13+
providers::Providers,
14+
settings::Settings,
15+
types::error::{AppError, AppErrorKind},
16+
};
1517

1618
fn setup() -> Client {
1719
let mut settings = Settings::new().unwrap();

src/db/auth_db/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ use reqwest::{Client as RequestClient, Url, UrlError};
2525
use super::delivery_problems::{
2626
LegacyDeliveryProblem as DeliveryProblem, ProblemSubtype, ProblemType,
2727
};
28-
use settings::Settings;
29-
use types::{
30-
email_address::EmailAddress,
31-
error::{AppErrorKind, AppResult},
28+
use crate::{
29+
settings::Settings,
30+
types::{
31+
email_address::EmailAddress,
32+
error::{AppErrorKind, AppResult},
33+
},
3234
};
3335

3436
#[cfg(test)]

src/db/core/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ use serde::{de::DeserializeOwned, ser::Serialize};
2323
use serde_json;
2424
use sha2::Sha256;
2525

26-
use settings::Settings;
27-
use types::error::AppResult;
26+
use crate::{settings::Settings, types::error::AppResult};
2827

2928
/// Database client.
3029
///

src/db/delivery_problems/mod.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ use super::{
1919
auth_db::Db as AuthDb,
2020
core::{Client as DbClient, DataType},
2121
};
22-
use queues::notification::{BounceSubtype, BounceType, ComplaintFeedbackType};
23-
use settings::{DeliveryProblemLimit, DeliveryProblemLimits, Settings};
24-
use types::{
25-
email_address::EmailAddress,
26-
error::{AppErrorKind, AppResult},
22+
use crate::{
23+
queues::notification::{BounceSubtype, BounceType, ComplaintFeedbackType},
24+
settings::{DeliveryProblemLimit, DeliveryProblemLimits, Settings},
25+
types::{
26+
email_address::EmailAddress,
27+
error::{AppErrorKind, AppResult},
28+
},
2729
};
2830

2931
/// Bounce/complaint registry.

src/db/delivery_problems/test.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ use std::{thread::sleep, time::Duration};
77
use serde_json::{self, Value as Json};
88

99
use super::*;
10-
use db::{
11-
auth_db::{Db, DbClient},
12-
core::test::TestFixture,
10+
use crate::{
11+
db::{
12+
auth_db::{Db, DbClient},
13+
core::test::TestFixture,
14+
},
15+
queues::notification::{BounceSubtype, BounceType, ComplaintFeedbackType},
16+
settings::{Host, Settings},
17+
types::error::{AppErrorKind, AppResult},
1318
};
14-
use queues::notification::{BounceSubtype, BounceType, ComplaintFeedbackType};
15-
use settings::{Host, Settings};
16-
use types::error::{AppErrorKind, AppResult};
1719

1820
const SECOND: u64 = 1000;
1921
const MINUTE: u64 = SECOND * 60;

src/db/message_data/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
//! Storage for message metadata.
66
77
use super::core::{Client as DbClient, DataType};
8-
use settings::Settings;
9-
use types::error::AppResult;
8+
use crate::{settings::Settings, types::error::AppResult};
109

1110
#[cfg(test)]
1211
mod test;

0 commit comments

Comments
 (0)