style: use tabs over spaces
This commit is contained in:
parent
f2979d4cde
commit
f0550dd429
41 changed files with 1112 additions and 1109 deletions
|
@ -8,32 +8,32 @@ pub use github::*;
|
|||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Config {
|
||||
pub discord: DiscordConfig,
|
||||
pub github: GithubConfig,
|
||||
pub http_port: u16,
|
||||
pub redis_url: String,
|
||||
pub discord: DiscordConfig,
|
||||
pub github: GithubConfig,
|
||||
pub http_port: u16,
|
||||
pub redis_url: String,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
discord: DiscordConfig::default(),
|
||||
github: GithubConfig::default(),
|
||||
http_port: 3000,
|
||||
redis_url: "redis://localhost:6379".to_string(),
|
||||
}
|
||||
}
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
discord: DiscordConfig::default(),
|
||||
github: GithubConfig::default(),
|
||||
http_port: 3000,
|
||||
redis_url: "redis://localhost:6379".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn new_from_env() -> Result<Self> {
|
||||
let discord = DiscordConfig::new_from_env()?;
|
||||
let github = GithubConfig::new_from_env()?;
|
||||
pub fn new_from_env() -> Result<Self> {
|
||||
let discord = DiscordConfig::new_from_env()?;
|
||||
let github = GithubConfig::new_from_env()?;
|
||||
|
||||
Ok(Self {
|
||||
discord,
|
||||
github,
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
Ok(Self {
|
||||
discord,
|
||||
github,
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue