Skip to content

Commit 82c0195

Browse files
committed
refactor(encode): Make str repr inferring clearer
1 parent 330b590 commit 82c0195

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/toml_edit/src/encode.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,9 @@ fn infer_style(
417417
) -> (StringStyle, bool) {
418418
match (style, literal) {
419419
(Some(style), Some(literal)) => (style, literal),
420-
(_, Some(literal)) => (infer_all_style(value).0, literal),
421-
(Some(style), _) => (style, infer_all_style(value).1),
422-
(_, _) => infer_all_style(value),
420+
(None, Some(literal)) => (infer_all_style(value).0, literal),
421+
(Some(style), None) => (style, infer_all_style(value).1),
422+
(None, None) => infer_all_style(value),
423423
}
424424
}
425425

0 commit comments

Comments
 (0)