Skip to content

Commit

Permalink
Improve documentation of decode_len
Browse files Browse the repository at this point in the history
Fixes #111
  • Loading branch information
ia0 committed Sep 12, 2024
1 parent 2ca3aaa commit 395881a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
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

0 comments on commit 395881a

Please sign in to comment.