From 1a09a6d00a782db90501c0921dd4c7587f6eba72 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Sat, 23 May 2015 17:02:59 +1200 Subject: Use config file for constants --- src/expr.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/expr.rs') diff --git a/src/expr.rs b/src/expr.rs index 1da66c4e328..c1cbf175645 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -15,7 +15,7 @@ use lists::{write_list, ListFormatting, SeparatorTactic, ListTactic}; use syntax::{ast, ptr}; use syntax::codemap::{Span, Pos}; -use {MAX_WIDTH, MIN_STRING}; +use MIN_STRING; impl<'a> FmtVisitor<'a> { // TODO NEEDS TESTS @@ -26,7 +26,7 @@ impl<'a> FmtVisitor<'a> { // strings, or if the string is too long for the line. let l_loc = self.codemap.lookup_char_pos(span.lo); let r_loc = self.codemap.lookup_char_pos(span.hi); - if l_loc.line == r_loc.line && r_loc.col.to_usize() <= MAX_WIDTH { + if l_loc.line == r_loc.line && r_loc.col.to_usize() <= config!(max_width) { return self.snippet(span); } -- cgit 1.4.1-3-g733a5