Skip to content

Commit

Permalink
Wrapper::with_termwidth: expand docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeisler committed Aug 24, 2017
1 parent d132b64 commit 0af87c0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,14 @@ impl<'a> Wrapper<'a, HyphenSplitter> {
/// because the standard input and output is not connected to a
/// terminal), a width of 80 characters will be used. Other
/// settings use the same defaults as `Wrapper::new`.
///
/// Equivalent to:
///
/// ```
/// use textwrap::{Wrapper, termwidth};
///
/// let wrapper = Wrapper::new(termwidth());
/// ```
pub fn with_termwidth() -> Wrapper<'a, HyphenSplitter> {
Wrapper::new(termwidth())
}
Expand Down

0 comments on commit 0af87c0

Please sign in to comment.