Fixed documentation

This commit is contained in:
Cleo Rebert 2020-06-21 19:08:52 +02:00
parent 77dd798fd3
commit bb9b5d851c
2 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "totp-rs" name = "totp-rs"
version = "0.3.1" version = "0.3.2"
authors = ["Cleo Rebert <cleo.rebert@gmail.com>"] authors = ["Cleo Rebert <cleo.rebert@gmail.com>"]
edition = "2018" edition = "2018"
readme = "README.md" readme = "README.md"
@ -11,6 +11,8 @@ homepage = "https://github.com/constantoine/totp-rs"
keywords = ["authentification", "2fa", "totp", "hmac"] keywords = ["authentification", "2fa", "totp", "hmac"]
categories = ["authentication", "web-programming"] categories = ["authentication", "web-programming"]
[package.metadata.docs.rs]
features = [ "qr" ]
[features] [features]
default = [] default = []

View File

@ -2,7 +2,7 @@
//! //!
//! # Examples //! # Examples
//! //!
//! ``` //! ```rust
//! use std::time::SystemTime; //! use std::time::SystemTime;
//! use totp_rs::{Algorithm, TOTP}; //! use totp_rs::{Algorithm, TOTP};
//! //!
@ -23,7 +23,7 @@
//! println!("{}", token); //! println!("{}", token);
//! ``` //! ```
//! //!
//! ``` //! ```rust
//! use totp_rs::{Algorithm, TOTP}; //! use totp_rs::{Algorithm, TOTP};
//! //!
//! let username = "example".to_owned(); //! 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 /// # Errors
/// ///