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