Skip to content

Commit

Permalink
appease the clippy gods
Browse files Browse the repository at this point in the history
  • Loading branch information
cactusdualcore committed Apr 15, 2024
1 parent ff0ef3d commit 029a991
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions src/engine/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl ReedlineBuilder {
}

pub fn history(&self) -> Option<&dyn History> {
(&self.history).as_deref()
self.history.as_deref()
}

/// Use a [`Hinter`](crate::Hinter).
Expand All @@ -137,7 +137,7 @@ impl ReedlineBuilder {
}

pub fn hints(&self) -> Option<&dyn Hinter> {
(&self.hinter).as_deref()
self.hinter.as_deref()
}

/// Use a [`Completer`](crate::Completer).
Expand All @@ -153,7 +153,7 @@ impl ReedlineBuilder {
}

pub fn completions(&self) -> Option<&dyn Completer> {
(&self.completer).as_deref()
self.completer.as_deref()
}

/// Use a [`Highlighter`](crate::Highlighter).
Expand All @@ -169,7 +169,7 @@ impl ReedlineBuilder {
}

pub fn highlighter(&self) -> Option<&dyn Highlighter> {
(&self.highlighter).as_deref()
self.highlighter.as_deref()
}

/// Use a [`Validator`](crate::Validator).
Expand All @@ -185,7 +185,7 @@ impl ReedlineBuilder {
}

pub fn validator(&self) -> Option<&dyn Validator> {
(&self.validator).as_deref()
self.validator.as_deref()
}

/// Use of a different prompt on submitted inputs.
Expand All @@ -202,7 +202,7 @@ impl ReedlineBuilder {
}

pub fn transient_prompt(&self) -> Option<&dyn Prompt> {
(&self.transient_prompt).as_deref()
self.transient_prompt.as_deref()
}

/// Set the initial edit mode
Expand All @@ -218,7 +218,7 @@ impl ReedlineBuilder {
}

pub fn edit_mode(&self) -> Option<&dyn EditMode> {
(&self.edit_mode).as_deref()
self.edit_mode.as_deref()
}

/// Configure a history exclusion
Expand Down Expand Up @@ -247,7 +247,7 @@ impl ReedlineBuilder {
}

pub fn history_exclusion_prefix(&self) -> Option<&String> {
(&self.history_exclusion_prefix).as_ref()
self.history_exclusion_prefix.as_ref()
}

pub fn with_selection_style(mut self, selection_style: Style) -> Self {
Expand All @@ -262,7 +262,7 @@ impl ReedlineBuilder {

/// Configure the styling of visual selection
pub fn selection_style(&self) -> Option<&Style> {
(&self.visual_selection_style).as_ref()
self.visual_selection_style.as_ref()
}

/// Let reedline dynamically determine and change the cursor shape depending
Expand All @@ -279,7 +279,7 @@ impl ReedlineBuilder {
}

pub fn cursor_config(&self) -> Option<&CursorConfig> {
(&self.cursor_shapes).as_ref()
self.cursor_shapes.as_ref()
}

/// Set a new history session id
Expand All @@ -296,7 +296,7 @@ impl ReedlineBuilder {
}

pub fn history_session_id(&self) -> Option<HistorySessionId> {
self.history_session_id.clone()
self.history_session_id
}

#[cfg(feature = "external_printer")]
Expand All @@ -313,7 +313,7 @@ impl ReedlineBuilder {

#[cfg(feature = "external_printer")]
pub fn external_printer(&self) -> Option<&ExternalPrinter<String>> {
(&self.external_printer).as_ref()
self.external_printer.as_ref()
}

/// Set whether to use quick completions. They will select and fill a completion
Expand Down
2 changes: 1 addition & 1 deletion src/engine/inspection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl super::Reedline {

/// The history session id, or [`None`](Option::None) if no session is attached.
pub fn history_session_id(&self) -> Option<HistorySessionId> {
self.history_session_id.clone()
self.history_session_id
}

/// Set whether to use quick completions.
Expand Down

0 comments on commit 029a991

Please sign in to comment.