chore: cosmetic documentation fixes

This commit is contained in:
Dmitriy Pleshevskiy 2020-07-08 16:50:41 +03:00
parent 3397750f23
commit e8bedffbdd
5 changed files with 18 additions and 11 deletions

2
.gitignore vendored
View file

@ -1,4 +1,6 @@
.idea/
.vscode/
.DS_Store
/target
/itconfig-tests/target

View file

@ -85,7 +85,8 @@ config! {
}
fn main () {
// dotenv().ok();
// dotenv().expect("dotenv setup to be successful");
// or
env::set_var("FEATURE_NEW_MENU", "t");
config::init();
@ -96,9 +97,7 @@ fn main () {
}
```
Macro is an optional feature, enabled by default. You can install itconfig without default
features and use this lib as shown below
Macro is an optional feature, disabled by default. You can use this library without macro
```rust
use itconfig::*;
@ -106,6 +105,8 @@ use std::env;
// use dotenv::dotenv;
fn main() {
// dotenv().expect("dotenv setup to be successful");
// or
env::set_var("DATABASE_URL", "postgres://127.0.0.1:5432/test");
let database_url = get_env::<String>("DATABASE_URL").unwrap();

View file

@ -15,7 +15,7 @@ config! {
}
fn main() {
dotenv().ok();
dotenv().expect("dotenv setup to be successful");
config::init();
let connection = db::establish_connection();

View file

@ -72,7 +72,8 @@ config! {
}
fn main () {
// dotenv().ok();
// dotenv().expect("dotenv setup to be successful");
// or
env::set_var("FEATURE_NEW_MENU", "t");
config::init();
@ -84,8 +85,7 @@ fn main () {
```
Macro is an optional feature, enabled by default. You can install itconfig without default
features and use this lib as shown below
Macro is an optional feature, disabled by default. You can use this library without macro
```rust
use itconfig::*;
@ -93,6 +93,8 @@ use std::env;
// use dotenv::dotenv;
fn main() {
// dotenv().expect("dotenv setup to be successful");
// or
env::set_var("DATABASE_URL", "postgres://127.0.0.1:5432/test");
let database_url = get_env::<String>("DATABASE_URL").unwrap();

View file

@ -78,7 +78,8 @@
//! }
//!
//! fn main () {
//! // dotenv().ok();
//! // dotenv().expect("dotenv setup to be successful");
//! // or
//! env::set_var("FEATURE_NEW_MENU", "t");
//!
//! config::init();
@ -90,8 +91,7 @@
//! }
//! ```
//!
//! Macro is an optional feature, enabled by default. You can install itconfig without default
//! features and use this lib as shown below
//! Macro is an optional feature, disabled by default. You can use this library without macro.
//!
//! ```rust
//! use itconfig::*;
@ -99,6 +99,8 @@
//! // use dotenv::dotenv;
//!
//! fn main() {
//! // dotenv().expect("dotenv setup to be successful");
//! // or
//! env::set_var("DATABASE_URL", "postgres://127.0.0.1:5432/test");
//!
//! let database_url = get_env::<String>("DATABASE_URL").unwrap();