Skip to content

Commit 0fdff8a

Browse files
committed
Allow improper_ctypes_definitions because our functions are only called internally
1 parent cfa77b3 commit 0fdff8a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "asn1_der"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
edition = "2018"
55
authors = ["KizzyCode Software Labs./Keziah Biermann <[email protected]>"]
66
keywords = ["asn1", "asn1-der", "serialize", "deserialize", "no_panic"]

src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl Asn1DerErrorVariant {
9191
/// `no_panic` because either way we have to assume that the code in the standard library is
9292
/// correct – see also
9393
/// [Is there a way to use potentially panicking code in a #[no_panic] function #16](https://github.com/dtolnay/no-panic/issues/16)_
94-
#[inline(never)]
94+
#[inline(never)] #[allow(improper_ctypes_definitions)]
9595
extern "C" fn write(f: &mut Formatter, kind: &str, desc: &str) -> fmt::Result {
9696
write!(f, "{}: {}", kind, desc)
9797
}
@@ -148,7 +148,7 @@ impl Asn1DerError {
148148
/// `no_panic` because either way we have to assume that the code in the standard library is
149149
/// correct – see also
150150
/// [Is there a way to use potentially panicking code in a #[no_panic] function #16](https://github.com/dtolnay/no-panic/issues/16)_
151-
#[inline(never)]
151+
#[inline(never)] #[allow(improper_ctypes_definitions)]
152152
extern "C" fn write(f: &mut Formatter, variant: &Asn1DerErrorVariant,
153153
source: &Option<ErrorSource>) -> fmt::Result
154154
{

src/typed/utf8_string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl<'a> Utf8String<'a> {
4242
/// `no_panic` because either way we have to assume that the code in the standard library is
4343
/// correct – see also
4444
/// [Is there a way to use potentially panicking code in a #[no_panic] function #16](https://github.com/dtolnay/no-panic/issues/16)_
45-
#[inline(never)]
45+
#[inline(never)] #[allow(improper_ctypes_definitions)]
4646
extern "C" fn is_utf8(slice: &[u8]) -> bool {
4747
str::from_utf8(slice).is_ok()
4848
}

0 commit comments

Comments
 (0)