rustfmt settings and ignores

This commit is contained in:
Stefan Bühler 2020-03-07 16:53:08 +01:00
parent d247291572
commit 460a8d1755
2 changed files with 24 additions and 0 deletions

View File

@ -4,6 +4,7 @@ use dnsbox_base::records::{NS, A, AAAA};
use dnsbox_base::ser::RRData; use dnsbox_base::ser::RRData;
use std::net::{Ipv4Addr, Ipv6Addr}; use std::net::{Ipv4Addr, Ipv6Addr};
#[rustfmt::skip]
static DATA: [(&str, &str, &str); 13] = [ static DATA: [(&str, &str, &str); 13] = [
("a.root-servers.net.", "198.41.0.4", "2001:503:ba3e::2:30"), ("a.root-servers.net.", "198.41.0.4", "2001:503:ba3e::2:30"),
("b.root-servers.net.", "199.9.14.201", "2001:500:200::b"), ("b.root-servers.net.", "199.9.14.201", "2001:500:200::b"),

23
rustfmt.toml Normal file
View File

@ -0,0 +1,23 @@
# Maximum width of each line
max_width = 100
# Error if unable to get all lines within max_width
error_on_line_overflow = false
# Use tab characters for indentation, spaces for alignment
hard_tabs = true
# Convert /* */ comments to // comments where possible
normalize_comments = false
# Put a trailing comma after a block based match arm (non-block arms are not affected)
match_block_trailing_comma = true
# Replace uses of the try! macro by the ? shorthand
use_try_shorthand = true
# don't screw alignment
ignore = [
'lib/dnsbox-base/src/common_types/types.rs',
'lib/dnsbox-base/src/common_types/classes.rs',
]