From 00f349ce1fb2b0ec74ff8fbbde7a446e993a1d71 Mon Sep 17 00:00:00 2001 From: gwenn <gtreguier@gmail.com> Date: Sun, 27 Nov 2016 11:00:13 +0100 Subject: [PATCH] Fix Config doc. --- examples/example.rs | 12 ++++++------ src/config.rs | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/examples/example.rs b/examples/example.rs index 63e88281..2ebea5dc 100644 --- a/examples/example.rs +++ b/examples/example.rs @@ -30,18 +30,18 @@ fn main() { Ok(line) => { rl.add_history_entry(line.as_ref()); println!("Line: {}", line); - }, + } Err(ReadlineError::Interrupted) => { println!("CTRL-C"); - break - }, + break; + } Err(ReadlineError::Eof) => { println!("CTRL-D"); - break - }, + break; + } Err(err) => { println!("Error: {:?}", err); - break + break; } } } diff --git a/src/config.rs b/src/config.rs index 4d09c796..2708527e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -3,8 +3,7 @@ use std::default::Default; #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct Config { - /// When listing completion alternatives, only display - /// one screen of possibilities at a time. + /// Maximum number of entries in History. max_history_size: usize, history_duplicates: HistoryDuplicates, history_ignore_space: bool, @@ -21,7 +20,7 @@ impl Config { Builder::new() } - /// Tell the maximum length for the history. + /// Tell the maximum length (i.e. number of entries) for the history. pub fn max_history_size(&self) -> usize { self.max_history_size } -- GitLab