chore: fix typos (#17)
* chore(server.rs): fix `retrieve_listening_addrs` Signed-off-by: Ryan Russell <git@ryanrussell.org> * docs(index.js): Fix `breadcrumb` Signed-off-by: Ryan Russell <git@ryanrussell.org>
This commit is contained in:
parent
2f40313a54
commit
916602ae2d
2 changed files with 3 additions and 3 deletions
|
@ -87,7 +87,7 @@ class Uploader {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add breadcumb
|
* Add breadcrumb
|
||||||
* @param {string} value
|
* @param {string} value
|
||||||
*/
|
*/
|
||||||
function addBreadcrumb(value) {
|
function addBreadcrumb(value) {
|
||||||
|
|
|
@ -966,7 +966,7 @@ fn to_content_range(range: &Range, complete_length: u64) -> Option<ContentRange>
|
||||||
|
|
||||||
fn print_listening(address: &str, port: u16, prefix: &str, tls: bool) {
|
fn print_listening(address: &str, port: u16, prefix: &str, tls: bool) {
|
||||||
let prefix = prefix.trim_end_matches('/');
|
let prefix = prefix.trim_end_matches('/');
|
||||||
let addrs = retrive_listening_addrs(address);
|
let addrs = retrieve_listening_addrs(address);
|
||||||
let protocol = if tls { "https" } else { "http" };
|
let protocol = if tls { "https" } else { "http" };
|
||||||
if addrs.len() == 1 {
|
if addrs.len() == 1 {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
|
@ -982,7 +982,7 @@ fn print_listening(address: &str, port: u16, prefix: &str, tls: bool) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn retrive_listening_addrs(address: &str) -> Vec<String> {
|
fn retrieve_listening_addrs(address: &str) -> Vec<String> {
|
||||||
if address == "0.0.0.0" {
|
if address == "0.0.0.0" {
|
||||||
if let Ok(interfaces) = get_if_addrs() {
|
if let Ok(interfaces) = get_if_addrs() {
|
||||||
let mut ifaces: Vec<IpAddr> = interfaces
|
let mut ifaces: Vec<IpAddr> = interfaces
|
||||||
|
|
Loading…
Reference in a new issue