Skip to content

Commit 20f1487

Browse files
committed
fix(toml): Deprecate compat hacks
`toml_edit` won't be able to support these. For example, cargo moved away from these in rust-lang/cargo#9932 to prepare for rust-lang/cargo#10086
1 parent c488802 commit 20f1487

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

crates/toml/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ The format is based on [Keep a Changelog].
77
<!-- next-header -->
88
## [Unreleased] - ReleaseDate
99

10+
### Compatibility
11+
12+
- Bumped MSRV to 1.60.0
13+
- Deprecated `Deserializer::set_require_newline_after_table`
14+
- Deprecated `Deserializer::set_allow_duplicate_after_longer_table`
15+
1016
## [0.5.9]
1117

1218
Changes:

crates/toml/src/de.rs

+4-12
Original file line numberDiff line numberDiff line change
@@ -1279,22 +1279,14 @@ impl<'a> Deserializer<'a> {
12791279
Ok(())
12801280
}
12811281

1282-
/// Historical versions of toml-rs accidentally allowed a newline after a
1283-
/// table definition, but the TOML spec requires a newline after a table
1284-
/// definition header.
1285-
///
1286-
/// This option can be set to `false` (the default is `true`) to emulate
1287-
/// this behavior for backwards compatibility with older toml-rs versions.
1282+
#[doc(hidden)]
1283+
#[deprecated(since = "0.5.10")]
12881284
pub fn set_require_newline_after_table(&mut self, require: bool) {
12891285
self.require_newline_after_table = require;
12901286
}
12911287

1292-
/// Historical versions of toml-rs accidentally allowed a duplicate table
1293-
/// header after a longer table header was previously defined. This is
1294-
/// invalid according to the TOML spec, however.
1295-
///
1296-
/// This option can be set to `true` (the default is `false`) to emulate
1297-
/// this behavior for backwards compatibility with older toml-rs versions.
1288+
#[doc(hidden)]
1289+
#[deprecated(since = "0.5.10")]
12981290
pub fn set_allow_duplicate_after_longer_table(&mut self, allow: bool) {
12991291
self.allow_duplciate_after_longer_table = allow;
13001292
}

0 commit comments

Comments
 (0)