Use wasmer_enumset

This commit is contained in:
Alexandre Bury 2021-01-18 10:50:55 -08:00
parent 2b4ee4df4f
commit 1c69461efa
5 changed files with 15 additions and 4 deletions

View File

@ -6,6 +6,8 @@
- Backends are now initialized when starting the event loop rather than when creating Cursive. - Backends are now initialized when starting the event loop rather than when creating Cursive.
- As a result initialization and runner functions have changed. - As a result initialization and runner functions have changed.
- `ColorStyle::color` is no longer an optional. Use `ColorType::InheritParent` if needed.
- Replaced `()` error types with some custom zero-sized types.
### API updates ### API updates
@ -25,12 +27,18 @@
- Add `SpannedString::trim(_{start, end})` to remove the unused prefix, suffix or both of the source. - Add `SpannedString::trim(_{start, end})` to remove the unused prefix, suffix or both of the source.
- Add `SpannedString::spans(_raw)_attr_mut` to give mutable access to the attribute of the spans. - Add `SpannedString::spans(_raw)_attr_mut` to give mutable access to the attribute of the spans.
- Add `TextContent::with_content` to give mutable access to the `StyledString` of a `TextView`. - Add `TextContent::with_content` to give mutable access to the `StyledString` of a `TextView`.
- Add `ColotyType::InheritParent` to carry over the front or back color from the parent.
- Add `Effect::Blink`.
- Add `Margins::zeros()`.
- Add `TextView::set_style`.
- Add `SpannedString`-shrinking methods.
### Improvements ### Improvements
- `ListView` now supports children taller than 1 row. - `ListView` now supports children taller than 1 row.
- Added an `autocomplete` example. - Added an `autocomplete` example.
- Added a `stopwatch` example. - Added a `stopwatch` example.
- `SpannedString` iterators are now double-ended and exact-sized.
### Bugfixes ### Bugfixes
@ -41,7 +49,6 @@
- Dispatch `call_on_*` methods to all screens. - Dispatch `call_on_*` methods to all screens.
- Fix potential issue with `setlocale` in ncurses backend on BSD. - Fix potential issue with `setlocale` in ncurses backend on BSD.
- Fix handling of multi-bytes newlines characters. - Fix handling of multi-bytes newlines characters.
- Fix
### Doc ### Doc

View File

@ -22,10 +22,10 @@ repository = "gyscos/cursive"
[dependencies] [dependencies]
enum-map = "0.6" enum-map = "0.6"
enumset = "1" wasmer_enumset = "1"
log = "0.4" log = "0.4"
owning_ref = "0.4" owning_ref = "0.4"
syn = "=1.0.57" # Pin syn to 1.0.57 since enumset currently incompatible with 1.0.58 syn = "1.0"
unicode-segmentation = "1" unicode-segmentation = "1"
unicode-width = "0.1" unicode-width = "0.1"
xi-unicode = "0.3" xi-unicode = "0.3"

View File

@ -9,6 +9,8 @@
//! [`cursive`]: https://docs.rs/cursive //! [`cursive`]: https://docs.rs/cursive
#![deny(missing_docs)] #![deny(missing_docs)]
extern crate wasmer_enumset as enumset;
macro_rules! new_default( macro_rules! new_default(
($c:ident<$t:ident>) => { ($c:ident<$t:ident>) => {
impl<$t> Default for $c<$t> { impl<$t> Default for $c<$t> {

View File

@ -18,7 +18,7 @@ features = ["unstable_scroll", "markdown", "toml"]
cursive_core = { path = "../cursive-core", version="0.1.1-alpha.0" } cursive_core = { path = "../cursive-core", version="0.1.1-alpha.0" }
crossbeam-channel = "0.5" crossbeam-channel = "0.5"
cfg-if = "1" cfg-if = "1"
enumset = "1" wasmer_enumset = "1"
unicode-segmentation = "1" unicode-segmentation = "1"
unicode-width = "0.1" unicode-width = "0.1"
lazy_static = "1" lazy_static = "1"

View File

@ -64,6 +64,8 @@
//! [`cursive::theme`]: ./theme/index.html //! [`cursive::theme`]: ./theme/index.html
#![deny(missing_docs)] #![deny(missing_docs)]
extern crate wasmer_enumset as enumset;
pub use cursive_core::*; pub use cursive_core::*;
mod utf8; mod utf8;