Don't explicitly list features

This commit is contained in:
nabijaczleweli 2016-10-10 01:42:55 +02:00
parent 01951aa213
commit 79c4bf29c2
No known key found for this signature in database
GPG Key ID: BCFD0B018D2658F1
5 changed files with 16 additions and 19 deletions

View File

@ -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"

View File

@ -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::*;

View File

@ -72,7 +72,7 @@ impl backend::Backend for PancursesBackend {
self.window.clear();
}
fn refresh(&self) {
fn refresh(&mut self) {
self.window.refresh();
}

View File

@ -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 {

View File

@ -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 {