Skip to content

Commit

Permalink
Merge pull request #814 from gwenn/doc_hist_add
Browse files Browse the repository at this point in the history
Improve doc of History::add
  • Loading branch information
gwenn authored Oct 7, 2024
2 parents 6642a89 + ad775d6 commit 6120cf3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,14 @@ pub trait History {
// reedline: fn append(&mut self, entry: &str);

/// Add a new entry in the history.
///
/// Return false if the `line` has been ignored (blank line / duplicate /
/// ...).
fn add(&mut self, line: &str) -> Result<bool>;
/// Add a new entry in the history.
///
/// Return false if the `line` has been ignored (blank line / duplicate /
/// ...).
fn add_owned(&mut self, line: String) -> Result<bool>; // TODO check AsRef<str> + Into<String> vs object safe

/// Return the number of entries in the history.
Expand Down

0 comments on commit 6120cf3

Please sign in to comment.