Skip to content

Commit 1e89513

Browse files
committed
Cleanup, imports
1 parent 6998e3b commit 1e89513

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

server/src/config.rs

Lines changed: 2 additions & 2 deletions
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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -163,24 +163,6 @@ pub fn get_client_agent(
163163
Ok(for_agent.into())
164164
}
165165

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

0 commit comments

Comments
 (0)