mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
simplify function to create a string from the itemized block
This commit is contained in:
parent
ab7f4e19eb
commit
3b18238009
@ -481,10 +481,7 @@ impl ItemizedBlock {
|
||||
|
||||
/// Returns the block as a string under its original form
|
||||
fn original_block_as_string(&self) -> String {
|
||||
self.lines
|
||||
.iter()
|
||||
.map(|line| format!("{}\n", line))
|
||||
.collect::<String>()
|
||||
self.lines.join("\n")
|
||||
}
|
||||
}
|
||||
|
||||
|
11
tests/target/issue-3224.rs
Normal file
11
tests/target/issue-3224.rs
Normal file
@ -0,0 +1,11 @@
|
||||
// rustfmt-wrap_comments: true
|
||||
|
||||
//! Test:
|
||||
//! * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
//! * [`examples/simple`] – Demonstrates use of the [`init`] API with plain
|
||||
//! structs.
|
||||
//! * [`examples/simple_flatbuffer`] – Demonstrates use of the [`init`] API with
|
||||
//! FlatBuffers.
|
||||
//! * [`examples/gravity`] – Demonstrates use of the [`RLBot::set_game_state`]
|
||||
//! API
|
||||
fn foo() {}
|
Loading…
Reference in New Issue
Block a user