Skip to content

Commit

Permalink
refactor(encode): Make str repr inferring clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jul 17, 2024
1 parent 330b590 commit 82c0195
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/toml_edit/src/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,9 @@ fn infer_style(
) -> (StringStyle, bool) {
match (style, literal) {
(Some(style), Some(literal)) => (style, literal),
(_, Some(literal)) => (infer_all_style(value).0, literal),
(Some(style), _) => (style, infer_all_style(value).1),
(_, _) => infer_all_style(value),
(None, Some(literal)) => (infer_all_style(value).0, literal),
(Some(style), None) => (style, infer_all_style(value).1),
(None, None) => infer_all_style(value),
}
}

Expand Down

0 comments on commit 82c0195

Please sign in to comment.