diff --git a/pingora-load-balancing/src/lib.rs b/pingora-load-balancing/src/lib.rs index bdbaf77..6a24c22 100644 --- a/pingora-load-balancing/src/lib.rs +++ b/pingora-load-balancing/src/lib.rs @@ -58,11 +58,12 @@ impl Backend { /// Create a new [Backend] with `weight` 1. The function will try to parse /// `addr` into a [std::net::SocketAddr]. pub fn new(addr: &str) -> Result { - Self::new_with_weight(addr,1) + Self::new_with_weight(addr, 1) } - // Create a new [Background] with address and weight. - pub fn new_with_weight(addr: &str,weight: usize) -> Result { + /// Creates a new [Backend] with the specified `weight`. The function will try to parse + /// `addr` into a [std::net::SocketAddr]. + pub fn new_with_weight(addr: &str, weight: usize) -> Result { let addr = addr .parse() .or_err(ErrorType::InternalError, "invalid socket addr")?;