Skip to content

Commit

Permalink
Merge pull request #521 from 9999years/set-width
Browse files Browse the repository at this point in the history
Add `Options::width`
  • Loading branch information
mgeisler committed Oct 29, 2023
2 parents 0337918 + 9f7ee55 commit 75f983d
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 75f983d

Please sign in to comment.