Skip to content

Commit c1f6ec3

Browse files
committed
review reflect
- fix description - fix test comment - remove unnecessary clone - remove unnecessary test file
1 parent 326be7e commit c1f6ec3

File tree

6 files changed

+6
-19
lines changed

6 files changed

+6
-19
lines changed

src/config/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ create_config! {
156156
"What emit Mode to use when none is supplied";
157157
make_backup: bool, false, false, "Backup changed files";
158158
inline_attribute_width: usize, 0, false,
159-
"Attributes is in line when line width is within inline_attribute_width";
159+
"Write an item and its attributes on the same line \
160+
if their combined width is below a threshold";
160161
}
161162

162163
/// Load a config by checking the client-supplied options and if appropriate, the

src/imports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ impl UseTree {
262262

263263
let allow_extend = if context.config.version() == Version::Two {
264264
let line_len = attr_str.len() + 1 + use_str.len();
265-
!attrs.clone().first().unwrap().is_sugared_doc
265+
!attrs.first().unwrap().is_sugared_doc
266266
&& context.config.inline_attribute_width() >= line_len
267267
} else {
268268
false

tests/source/issue-3343/one.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/source/issue-3343/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ use total_len_is::_50__;
1010
#[cfg(feature = "alloc")]
1111
use total_len_is::_51___;
1212

13-
/// comment
13+
/// this is a comment to test is_sugared_doc property
1414
use core::convert;

tests/target/issue-3343/one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ use total_len_is::_50__;
1010
#[cfg(feature = "alloc")]
1111
use total_len_is::_51___;
1212

13-
/// comment
13+
/// this is a comment to test is_sugared_doc property
1414
use core::convert;

tests/target/issue-3343/two.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
#[cfg(feature = "alloc")]
99
use total_len_is::_51___;
1010

11-
/// comment
11+
/// this is a comment to test is_sugared_doc property
1212
use core::convert;

0 commit comments

Comments
 (0)