diff --git a/src/uu/uptime/src/uptime.rs b/src/uu/uptime/src/uptime.rs index fe655c4d8..2a2bce9f9 100644 --- a/src/uu/uptime/src/uptime.rs +++ b/src/uu/uptime/src/uptime.rs @@ -3,7 +3,7 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// spell-checker:ignore getloadavg behaviour loadavg uptime upsecs updays upmins uphours boottime nusers utmpxname gettime clockid formated +// spell-checker:ignore getloadavg behaviour loadavg uptime upsecs updays upmins uphours boottime nusers utmpxname gettime clockid use chrono::{Local, TimeZone, Utc}; use clap::ArgMatches; @@ -296,6 +296,6 @@ fn print_time() { } fn print_uptime(boot_time: Option) -> UResult<()> { - print!("up {}, ", get_formated_uptime(boot_time)?); + print!("up {}, ", get_formatted_uptime(boot_time)?); Ok(()) } diff --git a/src/uucore/src/lib/features/uptime.rs b/src/uucore/src/lib/features/uptime.rs index 7d9c51fea..91fa9dd7d 100644 --- a/src/uucore/src/lib/features/uptime.rs +++ b/src/uucore/src/lib/features/uptime.rs @@ -3,7 +3,7 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// spell-checker:ignore gettime BOOTTIME clockid boottime formated nusers loadavg getloadavg +// spell-checker:ignore gettime BOOTTIME clockid boottime nusers loadavg getloadavg //! Provides functions to get system uptime, number of users and load average. @@ -165,7 +165,7 @@ pub fn get_uptime(_boot_time: Option) -> UResult { /// /// Returns a UResult with the uptime in a human-readable format(e.g. "1 day, 3:45") if successful, otherwise an UptimeError. #[inline] -pub fn get_formated_uptime(boot_time: Option) -> UResult { +pub fn get_formatted_uptime(boot_time: Option) -> UResult { let up_secs = get_uptime(boot_time)?; if up_secs < 0 {