Skip to content

Commit 9ea035f

Browse files
committed
review reflect
- fix description - fix test comment - remove unnecessary clone - remove unnecessary test file
1 parent 3bf6f97 commit 9ea035f

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
@@ -146,7 +146,8 @@ create_config! {
146146
"What emit Mode to use when none is supplied";
147147
make_backup: bool, false, false, "Backup changed files";
148148
inline_attribute_width: usize, 0, false,
149-
"Attributes is in line when line width is within inline_attribute_width";
149+
"Write an item and its attributes on the same line \
150+
if their combined width is below a threshold";
150151
}
151152

152153
/// Loads 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
@@ -252,7 +252,7 @@ impl UseTree {
252252

253253
let allow_extend = if context.config.version() == Version::Two {
254254
let line_len = attr_str.len() + 1 + use_str.len();
255-
!attrs.clone().first().unwrap().is_sugared_doc
255+
!attrs.first().unwrap().is_sugared_doc
256256
&& context.config.inline_attribute_width() >= line_len
257257
} else {
258258
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)