summaryrefslogtreecommitdiffstats
path: root/vendor/pem-rfc7468/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
commit837b550238aa671a591ccf282dddeab29cadb206 (patch)
tree914b6b8862bace72bd3245ca184d374b08d8a672 /vendor/pem-rfc7468/src
parentAdding debian version 1.70.0+dfsg2-1. (diff)
downloadrustc-837b550238aa671a591ccf282dddeab29cadb206.tar.xz
rustc-837b550238aa671a591ccf282dddeab29cadb206.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/pem-rfc7468/src')
-rw-r--r--vendor/pem-rfc7468/src/decoder.rs3
-rw-r--r--vendor/pem-rfc7468/src/encoder.rs2
-rw-r--r--vendor/pem-rfc7468/src/error.rs1
-rw-r--r--vendor/pem-rfc7468/src/lib.rs8
4 files changed, 5 insertions, 9 deletions
diff --git a/vendor/pem-rfc7468/src/decoder.rs b/vendor/pem-rfc7468/src/decoder.rs
index 8b8286a97..16e97fb56 100644
--- a/vendor/pem-rfc7468/src/decoder.rs
+++ b/vendor/pem-rfc7468/src/decoder.rs
@@ -45,7 +45,6 @@ pub fn decode<'i, 'o>(pem: &'i [u8], buf: &'o mut [u8]) -> Result<(&'i str, &'o
/// Decode a PEM document according to RFC 7468's "Strict" grammar, returning
/// the result as a [`Vec`] upon success.
#[cfg(feature = "alloc")]
-#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
pub fn decode_vec(pem: &[u8]) -> Result<(&str, Vec<u8>)> {
let mut decoder = Decoder::new(pem).map_err(|e| check_for_headers(pem, e))?;
let type_label = decoder.type_label();
@@ -107,7 +106,6 @@ impl<'i> Decoder<'i> {
/// Decode all of the remaining data in the input buffer into `buf`.
#[cfg(feature = "alloc")]
- #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
pub fn decode_to_end<'o>(&mut self, buf: &'o mut Vec<u8>) -> Result<&'o [u8]> {
Ok(self.base64.decode_to_end(buf)?)
}
@@ -130,7 +128,6 @@ impl<'i> From<Decoder<'i>> for Base64Decoder<'i> {
}
#[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl<'i> io::Read for Decoder<'i> {
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
self.base64.read(buf)
diff --git a/vendor/pem-rfc7468/src/encoder.rs b/vendor/pem-rfc7468/src/encoder.rs
index 016e224c6..c48df1f62 100644
--- a/vendor/pem-rfc7468/src/encoder.rs
+++ b/vendor/pem-rfc7468/src/encoder.rs
@@ -119,7 +119,6 @@ pub fn encode<'o>(
/// Encode a PEM document according to RFC 7468's "Strict" grammar, returning
/// the result as a [`String`].
#[cfg(feature = "alloc")]
-#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
pub fn encode_string(label: &str, line_ending: LineEnding, input: &[u8]) -> Result<String> {
let expected_len = encoded_len(label, line_ending, input)?;
let mut buf = vec![0u8; expected_len];
@@ -287,7 +286,6 @@ impl<'l, 'o> Encoder<'l, 'o> {
}
#[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl<'l, 'o> io::Write for Encoder<'l, 'o> {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
self.encode(buf)?;
diff --git a/vendor/pem-rfc7468/src/error.rs b/vendor/pem-rfc7468/src/error.rs
index dd0ce87d5..6a93465b5 100644
--- a/vendor/pem-rfc7468/src/error.rs
+++ b/vendor/pem-rfc7468/src/error.rs
@@ -88,7 +88,6 @@ impl From<core::str::Utf8Error> for Error {
}
#[cfg(feature = "std")]
-#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl From<Error> for std::io::Error {
fn from(err: Error) -> std::io::Error {
let kind = match err {
diff --git a/vendor/pem-rfc7468/src/lib.rs b/vendor/pem-rfc7468/src/lib.rs
index 15da39eed..45f4877df 100644
--- a/vendor/pem-rfc7468/src/lib.rs
+++ b/vendor/pem-rfc7468/src/lib.rs
@@ -1,18 +1,20 @@
#![no_std]
-#![cfg_attr(docsrs, feature(doc_cfg))]
+#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc = include_str!("../README.md")]
#![doc(
- html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg",
- html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg"
+ html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
+ html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg"
)]
#![deny(unsafe_code)]
#![warn(
clippy::integer_arithmetic,
+ clippy::mod_module_files,
clippy::panic,
clippy::panic_in_result_fn,
clippy::unwrap_used,
missing_docs,
rust_2018_idioms,
+ unused_lifetimes,
unused_qualifications
)]