Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation of decode_len #112

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ name = "data-encoding"
path = "src/main.rs"

[dependencies]
data-encoding = { version = "2.6.0", path = "../lib" }
data-encoding = { version = "2.6.1-git", path = "../lib" }
getopts = "0.2"
6 changes: 6 additions & 0 deletions lib/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 2.6.1-git

### Patch

- Improve documentation of `Encoding::decode_len()` (fixes #111)

## 2.6.0

### Minor
Expand Down
2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "data-encoding"
version = "2.6.0"
version = "2.6.1-git"
authors = ["Julien Cretin <[email protected]>"]
license = "MIT"
edition = "2018"
Expand Down
6 changes: 3 additions & 3 deletions lib/macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "data-encoding-macro"
version = "0.1.15"
version = "0.1.16-git"
authors = ["Julien Cretin <[email protected]>"]
license = "MIT"
edition = "2018"
Expand All @@ -14,5 +14,5 @@ description = "Macros for data-encoding"
include = ["Cargo.toml", "LICENSE", "README.md", "src/lib.rs"]

[dependencies]
data-encoding = { version = "2.6.0", path = "..", default-features = false }
data-encoding-macro-internal = { version = "0.1.13", path = "internal" }
data-encoding = { version = "2.6.1-git", path = "..", default-features = false }
data-encoding-macro-internal = { version = "0.1.14-git", path = "internal" }
4 changes: 2 additions & 2 deletions lib/macro/internal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "data-encoding-macro-internal"
version = "0.1.13"
version = "0.1.14-git"
authors = ["Julien Cretin <[email protected]>"]
license = "MIT"
edition = "2018"
Expand All @@ -14,7 +14,7 @@ include = ["Cargo.toml", "LICENSE", "README.md", "src/lib.rs"]
proc-macro = true

[dependencies.data-encoding]
version = "2.6.0"
version = "2.6.1-git"
path = "../.."
default-features = false
features = ["alloc"]
Expand Down
5 changes: 3 additions & 2 deletions lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1393,9 +1393,10 @@ impl Encoding {
unsafe { String::from_utf8_unchecked(output) }
}

/// Returns the decoded length of an input of length `len`
/// Returns the maximum decoded length of an input of length `len`
///
/// See [`decode_mut`] for when to use it.
/// See [`decode_mut`] for when to use it. In particular, the actual decoded length might be
/// smaller if the actual input contains padding or ignored characters.
///
/// # Errors
///
Expand Down