mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-09 19:00:46 +00:00
Don't explicitly list features
This commit is contained in:
parent
01951aa213
commit
79c4bf29c2
@ -14,12 +14,6 @@ version = "0.3.1"
|
||||
[build-dependencies]
|
||||
skeptic = "0.6"
|
||||
|
||||
[features]
|
||||
cursive_ncurses = ["ncurses"]
|
||||
cursive_pancurses = ["pancurses"]
|
||||
cursive_termion = ["termion"]
|
||||
default = ["cursive_ncurses"]
|
||||
|
||||
[dependencies]
|
||||
odds = "0.2"
|
||||
toml = "0.2"
|
||||
@ -44,5 +38,8 @@ optional = true
|
||||
rand = "0.3"
|
||||
skeptic = "0.6"
|
||||
|
||||
[features]
|
||||
default = ["ncurses"]
|
||||
|
||||
[lib]
|
||||
name = "cursive"
|
||||
|
@ -1,13 +1,13 @@
|
||||
use theme::{BaseColor, Color};
|
||||
|
||||
#[cfg(feature = "cursive_ncurses")]
|
||||
#[cfg(feature = "ncurses")]
|
||||
mod n;
|
||||
#[cfg(feature = "cursive_ncurses")]
|
||||
#[cfg(feature = "ncurses")]
|
||||
pub use self::n::*;
|
||||
|
||||
#[cfg(feature = "cursive_pancurses")]
|
||||
#[cfg(feature = "pancurses")]
|
||||
mod pan;
|
||||
#[cfg(feature = "cursive_pancurses")]
|
||||
#[cfg(feature = "pancurses")]
|
||||
pub use self::pan::*;
|
||||
|
||||
|
||||
|
@ -72,7 +72,7 @@ impl backend::Backend for PancursesBackend {
|
||||
self.window.clear();
|
||||
}
|
||||
|
||||
fn refresh(&self) {
|
||||
fn refresh(&mut self) {
|
||||
self.window.refresh();
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
use event;
|
||||
use theme;
|
||||
|
||||
#[cfg(feature = "cursive_termion")]
|
||||
#[cfg(feature = "termion")]
|
||||
mod termion;
|
||||
mod curses;
|
||||
|
||||
pub use self::curses::*;
|
||||
#[cfg(feature = "cursive_termion")]
|
||||
#[cfg(feature = "termion")]
|
||||
pub use self::termion::*;
|
||||
|
||||
pub trait Backend {
|
||||
|
12
src/lib.rs
12
src/lib.rs
@ -56,11 +56,11 @@
|
||||
//! and log to it instead of stdout.
|
||||
#![deny(missing_docs)]
|
||||
|
||||
#[cfg(feature = "cursive_ncurses")]
|
||||
#[cfg(feature = "ncurses")]
|
||||
extern crate ncurses;
|
||||
#[cfg(feature = "cursive_pancurses")]
|
||||
#[cfg(feature = "pancurses")]
|
||||
extern crate pancurses;
|
||||
#[cfg(feature = "cursive_termion")]
|
||||
#[cfg(feature = "termion")]
|
||||
extern crate termion;
|
||||
extern crate toml;
|
||||
extern crate unicode_segmentation;
|
||||
@ -158,13 +158,13 @@ pub struct Cursive {
|
||||
new_default!(Cursive);
|
||||
|
||||
#[doc(hidden)]
|
||||
#[cfg(feature = "cursive_ncurses")]
|
||||
#[cfg(feature = "ncurses")]
|
||||
pub type B = backend::NcursesBackend;
|
||||
#[doc(hidden)]
|
||||
#[cfg(feature = "cursive_pancurses")]
|
||||
#[cfg(feature = "pancurses")]
|
||||
pub type B = backend::PancursesBackend;
|
||||
#[doc(hidden)]
|
||||
#[cfg(feature = "cursive_termion")]
|
||||
#[cfg(feature = "termion")]
|
||||
pub type B = backend::TermionBackend;
|
||||
|
||||
impl Cursive {
|
||||
|
Loading…
Reference in New Issue
Block a user