mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
remove deprecated features
This commit is contained in:
parent
e9e5c5ad22
commit
5ab51db946
5 changed files with 6 additions and 132 deletions
13
src/tool.rs
13
src/tool.rs
|
|
@ -1,8 +1,5 @@
|
|||
//! Some shared helpers collection
|
||||
|
||||
// Global dependencies
|
||||
use gtk::glib::{DateTime, GString};
|
||||
|
||||
/// Format bytes to KB/MB/GB presentation
|
||||
pub fn format_bytes(value: usize) -> String {
|
||||
const KB: f32 = 1024.0;
|
||||
|
|
@ -24,13 +21,3 @@ pub fn format_bytes(value: usize) -> String {
|
|||
format!("{:.2} GB", f / GB)
|
||||
}
|
||||
}
|
||||
|
||||
/// Format given [DateTime](https://docs.gtk.org/glib/struct.DateTime.html)
|
||||
pub fn format_time(t: &DateTime) -> GString {
|
||||
t.format_iso8601().unwrap() // @TODO handle?
|
||||
}
|
||||
|
||||
/// Get current [DateTime](https://docs.gtk.org/glib/struct.DateTime.html)
|
||||
pub fn now() -> DateTime {
|
||||
DateTime::now_local().unwrap() // @TODO handle?
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue