mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Remove odds dependency
Now that `Vec::splice` is stable. Note: this means rustc >= 1.22 is required.
This commit is contained in:
parent
ccd1595f29
commit
6bc63a40c5
@ -29,7 +29,6 @@ repository = "gyscos/Cursive"
|
||||
log = "0.3"
|
||||
maplit = "1.0.0"
|
||||
num = "0.1"
|
||||
odds = "0.2"
|
||||
owning_ref = "0.3"
|
||||
toml = "0.4"
|
||||
unicode-segmentation = "1.0"
|
||||
|
@ -64,7 +64,6 @@ extern crate maplit;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate num;
|
||||
extern crate odds;
|
||||
extern crate owning_ref;
|
||||
extern crate toml;
|
||||
extern crate unicode_segmentation;
|
||||
|
@ -1,7 +1,6 @@
|
||||
use {Printer, With, XY};
|
||||
use direction::Direction;
|
||||
use event::{Event, EventResult, Key, MouseButton, MouseEvent};
|
||||
use odds::vec::VecExt;
|
||||
use std::cmp::min;
|
||||
use theme::{ColorStyle, Effect};
|
||||
use unicode_segmentation::UnicodeSegmentation;
|
||||
@ -360,7 +359,7 @@ impl TextArea {
|
||||
let affected_rows = first_row..last_row;
|
||||
let replacement_rows =
|
||||
new_rows.into_iter().map(|row| row.shifted(first_byte));
|
||||
VecExt::splice(&mut self.rows, affected_rows, replacement_rows);
|
||||
self.rows.splice(affected_rows, replacement_rows);
|
||||
self.fix_ghost_row();
|
||||
self.scrollbase.set_heights(size.y, self.rows.len());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user