Skip to content

Commit

Permalink
Improve doc of History::add
Browse files Browse the repository at this point in the history
  • Loading branch information
gwenn committed Oct 7, 2024
1 parent 6642a89 commit ad775d6
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 ad775d6

Please sign in to comment.