Add rustfmt.toml for longer lines

This commit is contained in:
kageru 2020-12-02 00:30:57 +01:00
parent 3dfcc6fad7
commit 16d7fa55e5
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2
2 changed files with 8 additions and 5 deletions

View File

@ -3,11 +3,7 @@ use itertools::Itertools;
use std::io::BufRead; use std::io::BufRead;
fn main() { fn main() {
let input: Vec<usize> = std::io::stdin() let input: Vec<usize> = std::io::stdin().lock().lines().filter_map(|l| l.unwrap().parse().ok()).collect();
.lock()
.lines()
.filter_map(|l| l.unwrap().parse().ok())
.collect();
let p1 = input let p1 = input
.iter() .iter()
.tuple_combinations() .tuple_combinations()

7
2020/rustfmt.toml Normal file
View File

@ -0,0 +1,7 @@
newline_style = "Unix"
max_width = 140
imports_layout = "Horizontal"
merge_imports = true
struct_field_align_threshold = 25
where_single_line = true
edition = "2018"