Skip to content

Commit

Permalink
build(deps): update dtoa requirement from 0.4 to 1.0 (prometheus#27)
Browse files Browse the repository at this point in the history
* build(deps): update dtoa requirement from 0.4 to 1.0

Updates the requirements on [dtoa](https://github.com/dtolnay/dtoa) to permit the latest version.
- [Release notes](https://github.com/dtolnay/dtoa/releases)
- [Commits](dtolnay/dtoa@0.4.0...1.0.1)

---
updated-dependencies:
- dependency-name: dtoa
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* src/encoding/text: Adjust to breaking changes in dtoa

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <[email protected]>
Signed-off-by: ackintosh <[email protected]>
  • Loading branch information
2 people authored and ackintosh committed Aug 27, 2022
1 parent ce41d39 commit 6aafa61
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Update to `itoa` `v1`. See [PR 28].
- Update to `dtoa` `v1`. See [PR 27].

[PR 28]: https://github.com/mxinden/rust-open-metrics-client/pull/28
[PR 27]: https://github.com/mxinden/rust-open-metrics-client/pull/27

## [0.13.0] - 2021-11-21

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ documentation = "https://docs.rs/open-metrics-client"
members = ["derive-text-encode"]

[dependencies]
dtoa = "0.4"
dtoa = "1.0"
itoa = "1.0"
owning_ref = "0.4"
open-metrics-client-derive-text-encode = { version = "0.1.1", path = "derive-text-encode" }
Expand Down
4 changes: 2 additions & 2 deletions src/encoding/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ pub trait Encode {
}

impl Encode for f64 {
fn encode(&self, mut writer: &mut dyn Write) -> Result<(), std::io::Error> {
dtoa::write(&mut writer, *self)?;
fn encode(&self, writer: &mut dyn Write) -> Result<(), std::io::Error> {
writer.write_all(dtoa::Buffer::new().format(*self).as_bytes())?;
Ok(())
}
}
Expand Down

0 comments on commit 6aafa61

Please sign in to comment.