mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-27 11:16:03 +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"
|
log = "0.3"
|
||||||
maplit = "1.0.0"
|
maplit = "1.0.0"
|
||||||
num = "0.1"
|
num = "0.1"
|
||||||
odds = "0.2"
|
|
||||||
owning_ref = "0.3"
|
owning_ref = "0.3"
|
||||||
toml = "0.4"
|
toml = "0.4"
|
||||||
unicode-segmentation = "1.0"
|
unicode-segmentation = "1.0"
|
||||||
|
@ -64,7 +64,6 @@ extern crate maplit;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate log;
|
extern crate log;
|
||||||
extern crate num;
|
extern crate num;
|
||||||
extern crate odds;
|
|
||||||
extern crate owning_ref;
|
extern crate owning_ref;
|
||||||
extern crate toml;
|
extern crate toml;
|
||||||
extern crate unicode_segmentation;
|
extern crate unicode_segmentation;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
use {Printer, With, XY};
|
use {Printer, With, XY};
|
||||||
use direction::Direction;
|
use direction::Direction;
|
||||||
use event::{Event, EventResult, Key, MouseButton, MouseEvent};
|
use event::{Event, EventResult, Key, MouseButton, MouseEvent};
|
||||||
use odds::vec::VecExt;
|
|
||||||
use std::cmp::min;
|
use std::cmp::min;
|
||||||
use theme::{ColorStyle, Effect};
|
use theme::{ColorStyle, Effect};
|
||||||
use unicode_segmentation::UnicodeSegmentation;
|
use unicode_segmentation::UnicodeSegmentation;
|
||||||
@ -360,7 +359,7 @@ impl TextArea {
|
|||||||
let affected_rows = first_row..last_row;
|
let affected_rows = first_row..last_row;
|
||||||
let replacement_rows =
|
let replacement_rows =
|
||||||
new_rows.into_iter().map(|row| row.shifted(first_byte));
|
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.fix_ghost_row();
|
||||||
self.scrollbase.set_heights(size.y, self.rows.len());
|
self.scrollbase.set_heights(size.y, self.rows.len());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user