Skip to content

Commit e5abe06

Browse files
authored
Improve rustdoc and attributes (#69)
- Imports README.md into the rustdoc, which previously lacked any sort of warnings about the state of the code - Use `no_std` unconditionally, which Just Works. We can link `std` separately if actually needed. - Use `warn` instead of `deny`: we deny warnings in CI anyway
1 parent 07fa673 commit e5abe06

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/lib.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1-
#![deny(
1+
#![no_std]
2+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
3+
#![doc = include_str!("../README.md")]
4+
#![doc(
5+
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg",
6+
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg"
7+
)]
8+
#![warn(
29
clippy::all,
310
// TODO: clippy::pedantic,
411
clippy::alloc_instead_of_core,
512
clippy::std_instead_of_alloc,
613
clippy::std_instead_of_core
714
)]
8-
#![cfg_attr(not(feature = "std"), no_std)]
15+
16+
//! # Usage
17+
//!
18+
//! See [`examples-xsmall`](https://github.com/RustCrypto/rustls-rustcrypto/tree/master/examples-xsmall)
19+
//! for a usage example.
920
1021
#[cfg(not(feature = "alloc"))]
1122
compile_error!("Rustls currently does not support alloc-less environments");

0 commit comments

Comments
 (0)