remove deprecated features

This commit is contained in:
yggverse 2025-01-21 18:29:09 +02:00
parent e9e5c5ad22
commit 5ab51db946
5 changed files with 6 additions and 132 deletions

View file

@ -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?
}