Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to fix the docs.rs build #682

Merged
merged 3 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ required-features = ["external_printer"]

[package.metadata.docs.rs]
# Whether to pass `--all-features` to Cargo (default: false)
all-features = true
all-features = false
features = ["bashisms", "external_printer", "sqlite"]
2 changes: 1 addition & 1 deletion src/edit_mode/vi/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl ParsedViSequence {
///
/// ### Note:
///
/// https://github.com/vim/vim/blob/140f6d0eda7921f2f0b057ec38ed501240903fc3/runtime/doc/motion.txt#L64-L70
/// <https://github.com/vim/vim/blob/140f6d0eda7921f2f0b057ec38ed501240903fc3/runtime/doc/motion.txt#L64-L70>
fn total_multiplier(&self) -> usize {
self.multiplier.unwrap_or(1) * self.count.unwrap_or(1)
}
Expand Down
5 changes: 4 additions & 1 deletion src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ impl Reedline {
/// You can check for that with [`crate::kitty_protocol_available`]
/// `Reedline` will perform this check internally
///
/// Read more: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
/// Read more: <https://sw.kovidgoyal.net/kitty/keyboard-protocol/>
pub fn use_kitty_keyboard_enhancement(mut self, enable: bool) -> Self {
self.kitty_protocol.set(enable);
self
Expand Down Expand Up @@ -1697,6 +1697,9 @@ impl Reedline {
}

/// Adds an external printer
///
/// ## Required feature:
/// `external_printer`
#[cfg(feature = "external_printer")]
pub fn with_external_printer(mut self, printer: ExternalPrinter<String>) -> Self {
self.external_printer = Some(printer);
Expand Down
3 changes: 3 additions & 0 deletions src/external_printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ pub const EXTERNAL_PRINTER_DEFAULT_CAPACITY: usize = 20;
/// An ExternalPrinter allows to print messages of text while editing a line.
/// The message is printed as a new line, the line-edit will continue below the
/// output.
///
/// ## Required feature:
/// `external_printer`
#[cfg(feature = "external_printer")]
#[derive(Debug, Clone)]
pub struct ExternalPrinter<T>
Expand Down
5 changes: 3 additions & 2 deletions src/history/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ pub struct HistoryItem<ExtraInfo: HistoryItemExtraInfo = IgnoreAllExtraInfo> {
/// the exit status of the command
pub exit_status: Option<i64>,
/// arbitrary additional information that might be interesting
/// NOTE: this attribute is required because of https://github.com/rust-lang/rust/issues/41617
/// (see https://github.com/serde-rs/serde/issues/1296#issuecomment-394056188 for the fix)
/// NOTE: this attribute is required because of
/// <https://github.com/rust-lang/rust/issues/41617>
/// (see <https://github.com/serde-rs/serde/issues/1296#issuecomment-394056188> for the fix)
#[serde(deserialize_with = "Option::<ExtraInfo>::deserialize")]
pub more_info: Option<ExtraInfo>,
}
Expand Down
3 changes: 3 additions & 0 deletions src/history/sqlite_backed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const SQLITE_APPLICATION_ID: i32 = 1151497937;
/// A history that stores the values to an SQLite database.
/// In addition to storing the command, the history can store an additional arbitrary HistoryEntryContext,
/// to add information such as a timestamp, running directory, result...
///
/// ## Required feature:
/// `sqlite` or `sqlite-dynlib`
pub struct SqliteBackedHistory {
db: rusqlite::Connection,
session: Option<HistorySessionId>,
Expand Down
2 changes: 1 addition & 1 deletion src/terminal_extensions/bracketed_paste.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crossterm::{event, execute};

/// Helper managing proper setup and teardown of bracketed paste mode
///
/// https://en.wikipedia.org/wiki/Bracketed-paste
/// <https://en.wikipedia.org/wiki/Bracketed-paste>
#[derive(Default)]
pub(crate) struct BracketedPasteGuard {
enabled: bool,
Expand Down
2 changes: 1 addition & 1 deletion src/terminal_extensions/kitty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crossterm::{event, execute};
/// * [kakoune text editor](https://github.com/mawww/kakoune/issues/4103)
/// * [dte text editor](https://gitlab.com/craigbarnes/dte/-/issues/138)
///
/// Refer to https://sw.kovidgoyal.net/kitty/keyboard-protocol/ if you're curious.
/// Refer to <https://sw.kovidgoyal.net/kitty/keyboard-protocol/> if you're curious.
#[derive(Default)]
pub(crate) struct KittyProtocolGuard {
enabled: bool,
Expand Down
2 changes: 1 addition & 1 deletion src/terminal_extensions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pub(crate) mod kitty;

/// Return if the terminal supports the kitty keyboard enhancement protocol
///
/// Read more: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
/// Read more: <https://sw.kovidgoyal.net/kitty/keyboard-protocol/>
///
/// SIDE EFFECT: Touches the terminal file descriptors
pub fn kitty_protocol_available() -> bool {
Expand Down