Fix formatting
This commit is contained in:
parent
2892a0d272
commit
d197823674
2 changed files with 21 additions and 19 deletions
|
|
@ -44,7 +44,6 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_single_magnet_link() {
|
fn test_single_magnet_link() {
|
||||||
|
|
||||||
let text = "Here is a magnet link: magnet:?xt=urn:btih:example";
|
let text = "Here is a magnet link: magnet:?xt=urn:btih:example";
|
||||||
|
|
||||||
let links = extract_magnet_links(text);
|
let links = extract_magnet_links(text);
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ use serde::{Deserialize, Serialize};
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use reddit_client::RedditClient;
|
|
||||||
use crate::magnet::{extract_magnet_links, Magnet};
|
use crate::magnet::{extract_magnet_links, Magnet};
|
||||||
|
use reddit_client::RedditClient;
|
||||||
|
|
||||||
mod magnet;
|
mod magnet;
|
||||||
mod reddit_client;
|
mod reddit_client;
|
||||||
|
|
@ -156,7 +156,10 @@ async fn main() -> Result<()> {
|
||||||
if let Some(submissions) = user_posts.get_vec(&username) {
|
if let Some(submissions) = user_posts.get_vec(&username) {
|
||||||
let mut filtered_posts = Vec::new();
|
let mut filtered_posts = Vec::new();
|
||||||
|
|
||||||
for post in submissions.iter().filter(|s| filter_posts(&*s.title, title_filter.clone())) {
|
for post in submissions
|
||||||
|
.iter()
|
||||||
|
.filter(|s| filter_posts(&*s.title, title_filter.clone()))
|
||||||
|
{
|
||||||
let title = &post.title;
|
let title = &post.title;
|
||||||
let body = &post.body;
|
let body = &post.body;
|
||||||
let subreddit = &post.subreddit;
|
let subreddit = &post.subreddit;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue