Skip to content

Commit

Permalink
Merge pull request #456 from mgeisler/explicit-options-type
Browse files Browse the repository at this point in the history
Use an explicit type when converting into `Options`
  • Loading branch information
mgeisler committed Jun 6, 2022
2 parents 114da40 + 737a23c commit 450abf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ where
{
let trimmed = filled_text.trim_end_matches('\n');
let (text, options) = unfill(trimmed);
let mut new_options = new_width_or_options.into();
let mut new_options: Options = new_width_or_options.into();
new_options.initial_indent = options.initial_indent;
new_options.subsequent_indent = options.subsequent_indent;
let mut refilled = fill(&text, new_options);
Expand Down Expand Up @@ -903,7 +903,7 @@ pub fn wrap<'a, Opt>(text: &str, width_or_options: Opt) -> Vec<Cow<'_, str>>
where
Opt: Into<Options<'a>>,
{
let options = width_or_options.into();
let options: Options = width_or_options.into();

let initial_width = options
.width
Expand Down Expand Up @@ -1054,7 +1054,7 @@ where
{
assert!(columns > 0);

let mut options = total_width_or_options.into();
let mut options: Options = total_width_or_options.into();

let inner_width = options
.width
Expand Down

0 comments on commit 450abf5

Please sign in to comment.