From 91a78f402b32b37855af3fcdbc621d9d243f67f5 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Mon, 11 Mar 2019 00:03:54 -0700 Subject: [PATCH] Hide view::scroll behind unstable_scroll feature --- Cargo.toml | 1 + src/view/mod.rs | 4 ++++ src/view/scroll/mod.rs | 2 ++ 3 files changed, 7 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 09b5b1d..bc874b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,6 +78,7 @@ markdown = ["pulldown-cmark"] ncurses-backend = ["ncurses", "maplit", "term_size"] pancurses-backend = ["pancurses", "maplit", "term_size"] termion-backend = ["termion"] +unstable_scroll = [] [lib] name = "cursive" diff --git a/src/view/mod.rs b/src/view/mod.rs index 3aebdc4..8a763d4 100644 --- a/src/view/mod.rs +++ b/src/view/mod.rs @@ -51,7 +51,11 @@ mod view_trait; // Helper bases mod boxable; mod identifiable; +#[cfg(feature = "unstable_scroll")] pub mod scroll; +#[cfg(not(feature = "unstable_scroll"))] +pub(crate) mod scroll; + mod scroll_base; mod scrollable; diff --git a/src/view/scroll/mod.rs b/src/view/scroll/mod.rs index 7a033e9..d88e94f 100644 --- a/src/view/scroll/mod.rs +++ b/src/view/scroll/mod.rs @@ -1,5 +1,7 @@ //! Core mechanisms to implement scrolling. //! +//! *This module is still unstable and may go through breaking changes.* +//! //! This module defines [`ScrollCore`](crate::view::scroll::ScrollCore) and related traits. //! //! [`ScrollView`](crate::views::ScrollView) may be an easier way to add scrolling to an existing view.