bearssl, bearssl-sys: `lib.rs` QoL improvements

* Include the crate's `README.md` as the main doc
* Add common lint denies
* Unify multiple allows into one
main
Aydin Mercan 2022-09-17 15:47:19 +03:00
parent 279f8ac3e4
commit 2f977dc7dd
Signed by: jaiden
SSH Key Fingerprint: SHA256:vy6hjzotbn/MWZAbjzURNk3NL62EPkjoHsJ5xr/s7nk
3 changed files with 56 additions and 4 deletions

View File

@ -1,8 +1,16 @@
#![doc = include_str!("../README.md")]
#![no_std] #![no_std]
#![allow(non_camel_case_types)] #![allow(clippy::missing_safety_doc, non_camel_case_types, non_snake_case, non_upper_case_globals)]
#![allow(non_snake_case)] #![deny(
#![allow(non_upper_case_globals)] clippy::expect_used,
#![allow(clippy::missing_safety_doc)] clippy::panic,
clippy::panic_in_result_fn,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::zero_ptr,
unused_lifetimes,
unused_qualifications
)]
#[cfg(feature = "dont-assume-size_t-equals-uintptr_t")] #[cfg(feature = "dont-assume-size_t-equals-uintptr_t")]
use libc::size_t; use libc::size_t;

View File

@ -25,3 +25,36 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE. THIS SOFTWARE.
Footer Footer
``` ```
## RustCrypto Projects
* General layout and `lib.rs` is inspired from how RustCrypto people do it.
```
Copyright (c) 2021 The RustCrypto Project Developers
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
```

View File

@ -1,4 +1,15 @@
#![doc = include_str!("../README.md")]
#![no_std] #![no_std]
#![deny(
clippy::expect_used,
clippy::panic,
clippy::panic_in_result_fn,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::zero_ptr,
unused_lifetimes,
unused_qualifications
)]
#[cfg(feature = "std")] #[cfg(feature = "std")]
extern crate std; extern crate std;