Skip to content

Commit 713a794

Browse files
authored
Prep release (#15)
* Update crates * Update CHANGELOG * Fix lint
1 parent fe5ee76 commit 713a794

File tree

3 files changed

+15
-57
lines changed

3 files changed

+15
-57
lines changed

Cargo.lock

Lines changed: 10 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

toml-span/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
<!-- next-header -->
1111
## [Unreleased] - ReleaseDate
12+
### Fixed
13+
- [PR#14](https://github.com/EmbarkStudios/toml-span/pull/14) fixed an issue where subtables were not correctly created with dotted keys. Thanks [@hacrvlq](https://github.com/hacrvlq)!
14+
1215
## [0.5.0] - 2025-04-03
1316
### Changed
1417
- [PR#12](https://github.com/EmbarkStudios/toml-span/pull/12) updated `codespan-reporting` to 0.12, and update to edition 2024.

toml-span/src/error.rs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -230,21 +230,6 @@ impl Display for Error {
230230
ErrorKind::UnexpectedValue { expected, .. } => write!(f, "expected '{expected:?}'")?,
231231
}
232232

233-
// if !self.key.is_empty() {
234-
// write!(f, " for key `")?;
235-
// for (i, k) in self.key.iter().enumerate() {
236-
// if i > 0 {
237-
// write!(f, ".")?;
238-
// }
239-
// write!(f, "{}", k)?;
240-
// }
241-
// write!(f, "`")?;
242-
// }
243-
244-
// if let Some(line) = self.line {
245-
// write!(f, " at line {} column {}", line + 1, self.col + 1)?;
246-
// }
247-
248233
Ok(())
249234
}
250235
}
@@ -262,7 +247,7 @@ impl Error {
262247

263248
use codespan_reporting::diagnostic::Label;
264249

265-
let diag = match &self.kind {
250+
match &self.kind {
266251
ErrorKind::DuplicateKey { first, .. } => diag.with_labels(vec![
267252
Label::secondary(fid, *first).with_message("first key instance"),
268253
Label::primary(fid, self.span).with_message("duplicate key"),
@@ -352,9 +337,7 @@ impl Error {
352337
ErrorKind::Custom(msg) => diag
353338
.with_message(msg.to_string())
354339
.with_labels(vec![Label::primary(fid, self.span)]),
355-
};
356-
357-
diag
340+
}
358341
}
359342
}
360343

0 commit comments

Comments
 (0)