Run cargo fmt
This commit is contained in:
+3
-3
@@ -140,7 +140,7 @@ mod state;
|
||||
mod utils;
|
||||
|
||||
/// Payphone's main entrypoint function.
|
||||
///
|
||||
///
|
||||
/// Parses ENV variables and CLI arguments, sets up the logger, and runs [`start`] or [`docs`]
|
||||
/// depending on the command.
|
||||
#[tokio::main]
|
||||
@@ -167,7 +167,7 @@ pub async fn main() {
|
||||
}
|
||||
|
||||
/// Starts a Payphone shard.
|
||||
///
|
||||
///
|
||||
/// TODO: Support multiple shards.
|
||||
async fn start(token: String, database_addr: String) {
|
||||
log::info!("Welcome to Payphone, Nyeki!");
|
||||
@@ -203,7 +203,7 @@ async fn start(token: String, database_addr: String) {
|
||||
}
|
||||
|
||||
/// Boots up a documentation server.
|
||||
///
|
||||
///
|
||||
/// It compiles the crate's documentation and recompiles it automatically when the source code
|
||||
/// changes.
|
||||
async fn docs(bind: SocketAddr, open_on_start: bool) {
|
||||
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
//! A set of generic utilities used across the codebase.
|
||||
//!
|
||||
//!
|
||||
//! It currently includes [`ToTitleCase`], [`get_random_u64`], and [`Bye`].
|
||||
|
||||
use rand::{Rng, SeedableRng};
|
||||
use rand_chacha::ChaCha20Rng;
|
||||
|
||||
/// Converts a string to title case.
|
||||
///
|
||||
///
|
||||
/// It removes all duplicate whitespaces and capitalizes the first letter of every word.
|
||||
pub trait ToTitleCase {
|
||||
fn to_title_case(&self) -> String;
|
||||
|
||||
Reference in New Issue
Block a user