mirror of
https://github.com/davegallant/rfd-notify.git
synced 2025-08-06 08:43:39 +00:00
Cargo update and clippy fix (#168)
* Bump serde from 1.0.132 to 1.0.136 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.132 to 1.0.136. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.132...v1.0.136) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Cargo update and clippy fix Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
@@ -22,7 +22,7 @@ mod tests {
|
||||
fn load_config_with_missing_sendgrid_api_key() {
|
||||
std::env::remove_var("SENDGRID_API_KEY");
|
||||
let file = "./examples/config.yaml";
|
||||
load(&file);
|
||||
load(file);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -32,7 +32,7 @@ mod tests {
|
||||
std::env::set_var("SENDGRID_API_KEY", "FAKE");
|
||||
std::env::set_var("SENDGRID_MAIL_FROM", "notify@rfd-notify.org");
|
||||
std::env::set_var("SENDGRID_MAIL_TO", "test@email.com");
|
||||
load(&file);
|
||||
load(file);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -10,6 +10,8 @@ pub fn send(topic: &Topic, posts: &Posts, expression: &str, config: &Config) {
|
||||
let api_key = &config.sendgrid.api_key;
|
||||
let sg = SGClient::new(api_key.to_string());
|
||||
|
||||
let web_path = format!("{}/{}", RFD_FORUMS_BASE_URL, topic.web_path);
|
||||
|
||||
let html_message = format!(
|
||||
"\
|
||||
<b>Date:</b> {}
|
||||
@@ -32,7 +34,7 @@ pub fn send(topic: &Topic, posts: &Posts, expression: &str, config: &Config) {
|
||||
topic.post_time,
|
||||
topic.offer.dealer_name.as_ref().unwrap_or(&"".to_string()),
|
||||
topic.offer.url.as_ref().unwrap_or(&"".to_string()),
|
||||
format!("{}/{}", RFD_FORUMS_BASE_URL, topic.web_path),
|
||||
web_path,
|
||||
posts.posts[0].body,
|
||||
expression,
|
||||
);
|
||||
|
Reference in New Issue
Block a user