Adjust documentation

This commit is contained in:
David Tolnay 2021-12-11 21:17:45 -08:00
parent 1d447bdf15
commit b618d972b2
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
3 changed files with 19 additions and 29 deletions

View File

@ -4,7 +4,7 @@ version = "0.4.8" # remember to update html_root_url
authors = ["David Tolnay <dtolnay@gmail.com>"]
rust-version = "1.36"
license = "MIT OR Apache-2.0"
description = "Fast functions for printing integer primitives to an io::Write"
description = "Fast integer primitive to string conversion"
repository = "https://github.com/dtolnay/itoa"
documentation = "https://docs.rs/itoa"
categories = ["value-formatting"]

View File

@ -6,19 +6,16 @@ itoa
[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-itoa-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K" height="20">](https://docs.rs/itoa)
[<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/itoa/CI/master?style=for-the-badge" height="20">](https://github.com/dtolnay/itoa/actions?query=branch%3Amaster)
This crate provides fast functions for printing integer primitives to an
[`io::Write`] or a [`fmt::Write`]. The implementation comes straight from
[libcore] but avoids the performance penalty of going through
[`fmt::Formatter`].
This crate provides a fast conversion of integer primitives to decimal strings.
The implementation comes straight from [libcore] but avoids the performance
penalty of going through [`core::fmt::Formatter`].
See also [`dtoa`] for printing floating point primitives.
*Version requirement: rustc 1.36+*
[`io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
[`fmt::Write`]: https://doc.rust-lang.org/core/fmt/trait.Write.html
[libcore]: https://github.com/rust-lang/rust/blob/b8214dc6c6fc20d0a660fb5700dca9ebf51ebe89/src/libcore/fmt/num.rs#L201-L254
[`fmt::Formatter`]: https://doc.rust-lang.org/std/fmt/struct.Formatter.html
[`core::fmt::Formatter`]: https://doc.rust-lang.org/std/fmt/struct.Formatter.html
[`dtoa`]: https://github.com/dtolnay/dtoa
```toml
@ -28,12 +25,6 @@ itoa = "0.4"
<br>
## Performance (lower is better)
![performance](https://raw.githubusercontent.com/dtolnay/itoa/master/performance.png)
<br>
## Example
```rust
@ -46,6 +37,12 @@ fn main() {
<br>
## Performance (lower is better)
![performance](https://raw.githubusercontent.com/dtolnay/itoa/master/performance.png)
<br>
#### License
<sup>

View File

@ -6,27 +6,16 @@
//!
//! <br>
//!
//! This crate provides fast functions for printing integer primitives to an
//! [`io::Write`] or a [`fmt::Write`]. The implementation comes straight from
//! [libcore] but avoids the performance penalty of going through
//! [`fmt::Formatter`].
//! This crate provides a fast conversion of integer primitives to decimal
//! strings. The implementation comes straight from [libcore] but avoids the
//! performance penalty of going through [`core::fmt::Formatter`].
//!
//! See also [`dtoa`] for printing floating point primitives.
//!
//! [`io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
//! [`fmt::Write`]: https://doc.rust-lang.org/core/fmt/trait.Write.html
//! [libcore]: https://github.com/rust-lang/rust/blob/b8214dc6c6fc20d0a660fb5700dca9ebf51ebe89/src/libcore/fmt/num.rs#L201-L254
//! [`fmt::Formatter`]: https://doc.rust-lang.org/std/fmt/struct.Formatter.html
//! [`core::fmt::Formatter`]: https://doc.rust-lang.org/std/fmt/struct.Formatter.html
//! [`dtoa`]: https://github.com/dtolnay/dtoa
//!
//! <br>
//!
//! # Performance (lower is better)
//!
//! ![performance](https://raw.githubusercontent.com/dtolnay/itoa/master/performance.png)
//!
//! <br>
//!
//! # Example
//!
//! ```
@ -36,6 +25,10 @@
//! assert_eq!(printed, "128");
//! }
//! ```
//!
//! # Performance (lower is better)
//!
//! ![performance](https://raw.githubusercontent.com/dtolnay/itoa/master/performance.png)
#![doc(html_root_url = "https://docs.rs/itoa/0.4.8")]
#![no_std]