Skip to content

Commit

Permalink
remove unstable rust fmt features
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdallas committed Nov 3, 2022
1 parent 888aa73 commit e4df161
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
12 changes: 1 addition & 11 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
edition = "2018"
edition = "2021"
# The "Default" setting has a heuristic which splits lines too aggresively.
use_small_heuristics = "Max"
# Prevent carriage returns
newline_style = "Unix"
# Reorder imports
reorder_imports = true
# Where to put binary operators in the line
binop_separator = "Front"
# Wrap comments into next line
wrap_comments = true
# Format string literals where necessary
format_strings = true
# Item layout inside a imports block
imports_layout = "HorizontalVertical"
# Indent on expressions or items.
indent_style = "Block"
8 changes: 1 addition & 7 deletions src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,7 @@ impl<'a> Client<'a> {
password: &'a str,
session: &'a reqwest::Client,
) -> Self {
Self {
client_id: id,
client_secret: secret,
username,
password,
session,
}
Self { client_id: id, client_secret: secret, username, password, session }
}

pub async fn login(&self) -> Result<Auth, GertError> {
Expand Down
2 changes: 1 addition & 1 deletion src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl<'a> Downloader<'a> {
&item_index,
);

if self.should_download {
if self.should_download {
let status = self.save_or_skip(url, &file_name);
// update the summary statistics based on the status
match status.await? {
Expand Down
2 changes: 1 addition & 1 deletion src/subreddit.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::fmt::Write;
use crate::errors::GertError;
use crate::structures::Listing;
use reqwest::Client;
use std::fmt::Write;

pub struct Subreddit {
/// Name of subreddit.
Expand Down

0 comments on commit e4df161

Please sign in to comment.