Skip to content

Commit

Permalink
Auto merge of #9620 - danieleades:refactor/use-writeln, r=Eh2406
Browse files Browse the repository at this point in the history
use 'writeln' instead of appending newline character
  • Loading branch information
bors committed Jun 23, 2021
2 parents 9233aa0 + 706c824 commit 58be979
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testsuite/weak_dep_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ use std::fmt::Write;
fn require(enabled_features: &[&str], disabled_features: &[&str]) -> String {
let mut s = String::new();
for feature in enabled_features {
write!(s, "#[cfg(not(feature=\"{feature}\"))] compile_error!(\"expected feature {feature} to be enabled\");\n",
writeln!(s, "#[cfg(not(feature=\"{feature}\"))] compile_error!(\"expected feature {feature} to be enabled\");",
feature=feature).unwrap();
}
for feature in disabled_features {
write!(s, "#[cfg(feature=\"{feature}\")] compile_error!(\"did not expect feature {feature} to be enabled\");\n",
writeln!(s, "#[cfg(feature=\"{feature}\")] compile_error!(\"did not expect feature {feature} to be enabled\");",
feature=feature).unwrap();
}
s
Expand Down

0 comments on commit 58be979

Please sign in to comment.