Fixed documentation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
diff --git a/Cargo.toml b/Cargo.toml
index 9ac0b71..cc05ed1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "totp-rs"
-version = "0.3.1"
+version = "0.3.2"
authors = ["Cleo Rebert <cleo.rebert@gmail.com>"]
edition = "2018"
readme = "README.md"
@@ -11,6 +11,8 @@ homepage = "https://github.com/constantoine/totp-rs"
keywords = ["authentification", "2fa", "totp", "hmac"]
categories = ["authentication", "web-programming"]
+[package.metadata.docs.rs]
+features = [ "qr" ]
[features]
default = []
diff --git a/src/lib.rs b/src/lib.rs
index 1cb959f..d2beeff 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2,7 +2,7 @@
//!
//! # Examples
//!
-//! ```
+//! ```rust
//! use std::time::SystemTime;
//! use totp_rs::{Algorithm, TOTP};
//!
@@ -23,7 +23,7 @@
//! println!("{}", token);
//! ```
//!
-//! ```
+//! ```rust
//! use totp_rs::{Algorithm, TOTP};
//!
//! let username = "example".to_owned();
@@ -157,7 +157,7 @@ impl TOTP {
)
}
- /// Will return a qrcode to automatically add a TOTP as a base64 string. Needs feature "qr" to be set. It is by default
+ /// Will return a qrcode to automatically add a TOTP as a base64 string. Needs feature `qr` to be enabled!
///
/// # Errors
///