Skip to content

Commit 47d8a79

Browse files
committed
Cleanup
1 parent 1ad3d4e commit 47d8a79

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ arc-swap = "0.4.6"
6868
notify = "4.0.15"
6969

7070
# Date and Time utilities
71-
chrono = { version = "0.4.11", features = ["serde"] }
71+
chrono = { version = "0.4.11", features = ["serde"] }
7272
time = "0.1" # TODO: Remove once `iron` is removed
7373

7474
[dependencies.postgres]

src/web/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use log::{debug, info};
66

77
/// ctry! (cratesfyitry) is extremely similar to try! and itry!
88
/// except it returns an error page response instead of plain Err.
9-
#[macro_export]
109
macro_rules! ctry {
1110
($req:expr, $result:expr $(,)?) => {
1211
match $result {
@@ -32,7 +31,6 @@ macro_rules! ctry {
3231

3332
/// cexpect will check an option and if it's not Some
3433
/// it will return an error page response
35-
#[macro_export]
3634
macro_rules! cexpect {
3735
($req:expr, $option:expr $(,)?) => {
3836
match $option {
@@ -58,7 +56,6 @@ macro_rules! cexpect {
5856
}
5957

6058
/// Gets an extension from Request
61-
#[macro_export]
6259
macro_rules! extension {
6360
($req:expr, $ext:ty) => {{
6461
// Bind $req so we can have good type errors and avoid re-evaluation
@@ -129,7 +126,6 @@ impl CratesfyiHandler {
129126
pool: Pool,
130127
config: Arc<Config>,
131128
template_data: Arc<TemplateData>,
132-
133129
build_queue: Arc<BuildQueue>,
134130
storage: Arc<Storage>,
135131
) -> CratesfyiHandler {
@@ -403,7 +399,7 @@ impl Server {
403399
build_queue: Arc<BuildQueue>,
404400
storage: Arc<Storage>,
405401
) -> Result<Self, Error> {
406-
// Initialize templates & sass
402+
// Initialize templates
407403
let template_data = Arc::new(TemplateData::new(&mut *db.get()?)?);
408404

409405
if reload_templates {

src/web/page/templates.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ impl TemplateData {
5252
thread::spawn(move || {
5353
fn reload(template_data: &TemplateData, pool: &Pool) -> Result<()> {
5454
let mut conn = pool.get()?;
55-
log::debug!("reloading templates...");
5655
template_data
5756
.templates
5857
.swap(Arc::new(load_templates(&mut conn)?));
@@ -68,7 +67,7 @@ impl TemplateData {
6867
if let Err(err) = reload(&template_data, &pool) {
6968
log::error!("failed to reload templates: {}", err);
7069
} else {
71-
log::info!("done reloading templates");
70+
log::info!("reloaded templates");
7271
}
7372
}
7473
});

0 commit comments

Comments
 (0)