summaryrefslogtreecommitdiffstats
path: root/vendor/base16ct/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/base16ct/src
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/base16ct/src')
-rw-r--r--vendor/base16ct/src/lib.rs24
-rw-r--r--vendor/base16ct/src/lower.rs2
-rw-r--r--vendor/base16ct/src/mixed.rs1
-rw-r--r--vendor/base16ct/src/upper.rs2
4 files changed, 15 insertions, 14 deletions
diff --git a/vendor/base16ct/src/lib.rs b/vendor/base16ct/src/lib.rs
index 413d512d8..435c50134 100644
--- a/vendor/base16ct/src/lib.rs
+++ b/vendor/base16ct/src/lib.rs
@@ -1,3 +1,18 @@
+#![no_std]
+#![cfg_attr(docsrs, feature(doc_auto_cfg))]
+#![doc(
+ html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
+ html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg"
+)]
+#![warn(
+ clippy::mod_module_files,
+ clippy::unwrap_used,
+ missing_docs,
+ rust_2018_idioms,
+ unused_lifetimes,
+ unused_qualifications
+)]
+
//! Pure Rust implementation of Base16 ([RFC 4648], a.k.a. hex).
//!
//! Implements lower and upper case Base16 variants without data-dependent branches
@@ -44,15 +59,6 @@
//!
//! [RFC 4648]: https://tools.ietf.org/html/rfc4648
-#![no_std]
-#![cfg_attr(docsrs, feature(doc_cfg))]
-#![warn(missing_docs, rust_2018_idioms)]
-#![doc(
- html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
- html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
- html_root_url = "https://docs.rs/base16ct/0.1.1"
-)]
-
#[cfg(feature = "alloc")]
#[macro_use]
extern crate alloc;
diff --git a/vendor/base16ct/src/lower.rs b/vendor/base16ct/src/lower.rs
index b6d9f9453..63aa74db3 100644
--- a/vendor/base16ct/src/lower.rs
+++ b/vendor/base16ct/src/lower.rs
@@ -9,7 +9,6 @@ pub fn decode(src: impl AsRef<[u8]>, dst: &mut [u8]) -> Result<&[u8], Error> {
/// Decode a lower Base16 (hex) string into a byte vector.
#[cfg(feature = "alloc")]
-#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
pub fn decode_vec(input: impl AsRef<[u8]>) -> Result<Vec<u8>, Error> {
let mut output = vec![0u8; decoded_len(input.as_ref())?];
decode(input, &mut output)?;
@@ -41,7 +40,6 @@ pub fn encode_str<'a>(src: &[u8], dst: &'a mut [u8]) -> Result<&'a str, Error> {
/// # Panics
/// If `input` length is greater than `usize::MAX/2`.
#[cfg(feature = "alloc")]
-#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
pub fn encode_string(input: &[u8]) -> String {
let elen = encoded_len(input);
let mut dst = vec![0u8; elen];
diff --git a/vendor/base16ct/src/mixed.rs b/vendor/base16ct/src/mixed.rs
index 50f778d80..0836d3ae4 100644
--- a/vendor/base16ct/src/mixed.rs
+++ b/vendor/base16ct/src/mixed.rs
@@ -9,7 +9,6 @@ pub fn decode(src: impl AsRef<[u8]>, dst: &mut [u8]) -> Result<&[u8], Error> {
/// Decode a mixed Base16 (hex) string into a byte vector.
#[cfg(feature = "alloc")]
-#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
pub fn decode_vec(input: impl AsRef<[u8]>) -> Result<Vec<u8>, Error> {
let mut output = vec![0u8; decoded_len(input.as_ref())?];
decode(input, &mut output)?;
diff --git a/vendor/base16ct/src/upper.rs b/vendor/base16ct/src/upper.rs
index 679006e21..a747f297c 100644
--- a/vendor/base16ct/src/upper.rs
+++ b/vendor/base16ct/src/upper.rs
@@ -9,7 +9,6 @@ pub fn decode(src: impl AsRef<[u8]>, dst: &mut [u8]) -> Result<&[u8], Error> {
/// Decode an upper Base16 (hex) string into a byte vector.
#[cfg(feature = "alloc")]
-#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
pub fn decode_vec(input: impl AsRef<[u8]>) -> Result<Vec<u8>, Error> {
let mut output = vec![0u8; decoded_len(input.as_ref())?];
decode(input, &mut output)?;
@@ -41,7 +40,6 @@ pub fn encode_str<'a>(src: &[u8], dst: &'a mut [u8]) -> Result<&'a str, Error> {
/// # Panics
/// If `input` length is greater than `usize::MAX/2`.
#[cfg(feature = "alloc")]
-#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
pub fn encode_string(input: &[u8]) -> String {
let elen = encoded_len(input);
let mut dst = vec![0u8; elen];