cannot use unstable rustfmt features outside nightly toolchain (#1338)
* cannot use unstable rustfmt features outside nightly toolchain * cleanup redundant rustfmt.toml files
This commit is contained in:
+2
-2
@@ -30,7 +30,7 @@ printf "[pre_commit] rustfmt "
|
||||
for file in $(git diff --name-only --cached); do
|
||||
if [ ${file: -3} == ".rs" ]; then
|
||||
# first collect all the files that need reformatting
|
||||
rustfmt --unstable-options --skip-children --write-mode=diff $file &>/dev/null
|
||||
rustfmt --check $file &>/dev/null
|
||||
if [ $? != 0 ]; then
|
||||
problem_files+=($file)
|
||||
result=1
|
||||
@@ -40,7 +40,7 @@ done
|
||||
|
||||
# now reformat all the files that need reformatting
|
||||
for file in ${problem_files[@]}; do
|
||||
rustfmt --unstable-options --skip-children --write-mode=overwrite $file
|
||||
rustfmt $file
|
||||
done
|
||||
|
||||
# and let the user know what just happened (and which files were affected)
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
hard_tabs = true
|
||||
wrap_comments = true
|
||||
@@ -1,2 +0,0 @@
|
||||
hard_tabs = true
|
||||
wrap_comments = true
|
||||
@@ -1,2 +0,0 @@
|
||||
hard_tabs = true
|
||||
wrap_comments = true
|
||||
@@ -1,2 +0,0 @@
|
||||
hard_tabs = true
|
||||
wrap_comments = true
|
||||
@@ -1,2 +0,0 @@
|
||||
hard_tabs = true
|
||||
wrap_comments = true
|
||||
@@ -1,2 +0,0 @@
|
||||
hard_tabs = true
|
||||
wrap_comments = true
|
||||
@@ -1,2 +1 @@
|
||||
hard_tabs = true
|
||||
wrap_comments = true
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
hard_tabs = true
|
||||
wrap_comments = true
|
||||
@@ -1,2 +0,0 @@
|
||||
hard_tabs = true
|
||||
wrap_comments = true
|
||||
@@ -1,2 +0,0 @@
|
||||
hard_tabs = true
|
||||
wrap_comments = true
|
||||
Reference in New Issue
Block a user