From 460a8d1755d2f97d37f341585da1601d4dc83fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Sat, 7 Mar 2020 16:53:08 +0100 Subject: [PATCH] rustfmt settings and ignores --- dnsbox/src/bin/resolver/cache/root_hints.rs | 1 + rustfmt.toml | 23 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 rustfmt.toml diff --git a/dnsbox/src/bin/resolver/cache/root_hints.rs b/dnsbox/src/bin/resolver/cache/root_hints.rs index ef6792d..c957ebb 100644 --- a/dnsbox/src/bin/resolver/cache/root_hints.rs +++ b/dnsbox/src/bin/resolver/cache/root_hints.rs @@ -4,6 +4,7 @@ use dnsbox_base::records::{NS, A, AAAA}; use dnsbox_base::ser::RRData; use std::net::{Ipv4Addr, Ipv6Addr}; +#[rustfmt::skip] static DATA: [(&str, &str, &str); 13] = [ ("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"), diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..8fdfaf4 --- /dev/null +++ b/rustfmt.toml @@ -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', +]