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