Enable clippy::vec_init_then_push
(#8771)
This PR enables the [`clippy::vec_init_then_push`](https://rust-lang.github.io/rust-clippy/master/index.html#/vec_init_then_push) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
6685d3ac97
commit
83f6a1ea49
3 changed files with 7 additions and 8 deletions
|
@ -68,11 +68,12 @@ async fn test_channel_buffers(db: &Arc<Database>) {
|
|||
.unwrap();
|
||||
|
||||
let mut buffer_a = Buffer::new(0, text::BufferId::new(1).unwrap(), "".to_string());
|
||||
let mut operations = Vec::new();
|
||||
operations.push(buffer_a.edit([(0..0, "hello world")]));
|
||||
operations.push(buffer_a.edit([(5..5, ", cruel")]));
|
||||
operations.push(buffer_a.edit([(0..5, "goodbye")]));
|
||||
operations.push(buffer_a.undo().unwrap().1);
|
||||
let operations = vec![
|
||||
buffer_a.edit([(0..0, "hello world")]),
|
||||
buffer_a.edit([(5..5, ", cruel")]),
|
||||
buffer_a.edit([(0..5, "goodbye")]),
|
||||
buffer_a.undo().unwrap().1,
|
||||
];
|
||||
assert_eq!(buffer_a.text(), "hello, cruel world");
|
||||
|
||||
let operations = operations
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue