comments cleanup
This commit is contained in:
parent
f7881fa07d
commit
4b849cfed6
1 changed files with 0 additions and 12 deletions
|
@ -15,21 +15,9 @@ use dotenv::dotenv;
|
|||
use std::env;
|
||||
|
||||
fn adminvector() -> Vec<String> {
|
||||
// vec![String::from("ModulatingForce")]
|
||||
// //vec![]
|
||||
dotenv().ok();
|
||||
let mut admins = Vec::new();
|
||||
|
||||
// for admin in env::var("bot_admins").unwrap().split(',') {
|
||||
// admins.push(String::from(admin))
|
||||
// }
|
||||
|
||||
// 03.17 - Forcen - Suggesting below instead :
|
||||
/*
|
||||
- this will push only if env::var() returns Ok() ;
|
||||
otherwise (like in Err(_)) do nothing
|
||||
*/
|
||||
|
||||
if let Ok(value) = env::var("bot_admins") {
|
||||
for admin in value.split(',') {
|
||||
admins.push(String::from(admin))
|
||||
|
|
Loading…
Reference in a new issue