Skip to content

Commit 32856aa

Browse files
committed
Cleanup, imports
1 parent a6e2658 commit 32856aa

File tree

4 files changed

+43
-30
lines changed

4 files changed

+43
-30
lines changed

Cargo.lock

+40-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/src/bin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use atomic_lib::{urls, Storelike};
1+
use atomic_lib::{atomic_url::Routes, Storelike};
22
use atomic_server_lib::config::Opts;
33
use std::{fs::File, io::Write};
44

server/src/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ pub struct Opts {
9393
#[clap(value_enum, long, env = "ATOMIC_TRACING", default_value = "stdout")]
9494
pub trace: Tracing,
9595

96-
/// Add this if you want so send e-mails (e.g. on user registration)
96+
/// Host address of an SMTP server. Add if you want so send e-mails (e.g. for user registration). Also set the port.
9797
#[clap(long, env = "ATOMIC_SMTP_HOST")]
9898
pub smpt_host: Option<String>,
9999

100-
/// Useful for debugging e-mails during development, or if your SMTP server has an unconventional port number.
100+
/// Port of your SMTP server.
101101
#[clap(long, env = "ATOMIC_SMTP_PORT", default_value = "25")]
102102
pub smpt_port: u16,
103103

server/src/helpers.rs

-18
Original file line numberDiff line numberDiff line change
@@ -160,24 +160,6 @@ pub fn get_client_agent(
160160
Ok(Some(for_agent))
161161
}
162162

163-
/// Finds the extension
164-
pub fn try_extension(path: &str) -> Option<(ContentType, &str)> {
165-
let items: Vec<&str> = path.split('.').collect();
166-
if items.len() == 2 {
167-
let path = items[0];
168-
let content_type = match items[1] {
169-
"json" => ContentType::Json,
170-
"jsonld" => ContentType::JsonLd,
171-
"jsonad" => ContentType::JsonAd,
172-
"html" => ContentType::Html,
173-
"ttl" => ContentType::Turtle,
174-
_ => return None,
175-
};
176-
return Some((content_type, path));
177-
}
178-
None
179-
}
180-
181163
fn session_cookies_from_header(header: &HeaderValue) -> AtomicServerResult<Vec<String>> {
182164
let cookies: Vec<&str> = header
183165
.to_str()

0 commit comments

Comments
 (0)