From 9f7ee55085683868f027852475f49da14cf07655 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Wed, 18 Oct 2023 09:52:16 -0700 Subject: [PATCH] Add `Options::width` --- src/options.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/options.rs b/src/options.rs index 2336816c..81cfee0f 100644 --- a/src/options.rs +++ b/src/options.rs @@ -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. ///