Skip to content

Commit

Permalink
Allow improper_ctypes_definitions because our functions are only ca…
Browse files Browse the repository at this point in the history
…lled internally
  • Loading branch information
KizzyCode committed Oct 28, 2020
1 parent cfa77b3 commit 0fdff8a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "asn1_der"
version = "0.7.1"
version = "0.7.2"
edition = "2018"
authors = ["KizzyCode Software Labs./Keziah Biermann <development@kizzycode.de>"]
keywords = ["asn1", "asn1-der", "serialize", "deserialize", "no_panic"]
Expand Down
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl Asn1DerErrorVariant {
/// `no_panic` because either way we have to assume that the code in the standard library is
/// correct – see also
/// [Is there a way to use potentially panicking code in a #[no_panic] function #16](https://github.com/dtolnay/no-panic/issues/16)_
#[inline(never)]
#[inline(never)] #[allow(improper_ctypes_definitions)]
extern "C" fn write(f: &mut Formatter, kind: &str, desc: &str) -> fmt::Result {
write!(f, "{}: {}", kind, desc)
}
Expand Down Expand Up @@ -148,7 +148,7 @@ impl Asn1DerError {
/// `no_panic` because either way we have to assume that the code in the standard library is
/// correct – see also
/// [Is there a way to use potentially panicking code in a #[no_panic] function #16](https://github.com/dtolnay/no-panic/issues/16)_
#[inline(never)]
#[inline(never)] #[allow(improper_ctypes_definitions)]
extern "C" fn write(f: &mut Formatter, variant: &Asn1DerErrorVariant,
source: &Option<ErrorSource>) -> fmt::Result
{
Expand Down
2 changes: 1 addition & 1 deletion src/typed/utf8_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl<'a> Utf8String<'a> {
/// `no_panic` because either way we have to assume that the code in the standard library is
/// correct – see also
/// [Is there a way to use potentially panicking code in a #[no_panic] function #16](https://github.com/dtolnay/no-panic/issues/16)_
#[inline(never)]
#[inline(never)] #[allow(improper_ctypes_definitions)]
extern "C" fn is_utf8(slice: &[u8]) -> bool {
str::from_utf8(slice).is_ok()
}
Expand Down

0 comments on commit 0fdff8a

Please sign in to comment.