Skip to content

Commit

Permalink
Add Options::width
Browse files Browse the repository at this point in the history
  • Loading branch information
9999years committed Oct 18, 2023
1 parent 04d36f1 commit 9f7ee55
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ impl<'a> Options<'a> {
}
}

/// Set [`self.width`] to the given value.
///
/// [`self.width`]: #structfield.width
pub fn width(self, width: usize) -> Self {
Options { width, ..self }
}

/// Change [`self.initial_indent`]. The initial indentation is
/// used on the very first line of output.
///
Expand Down

0 comments on commit 9f7ee55

Please sign in to comment.