Skip to content

Commit 3415dce

Browse files
Format Rust code using rustfmt
1 parent 1bf73ac commit 3415dce

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

src/run/functions.rs

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -771,15 +771,21 @@ pub fn getstring(
771771
}
772772
skips = leng;
773773
} else if vec[y] == "timeh" {
774-
imput_s.push_str(time_readable(y,
775-
vec.to_vec(),
776-
memory_names.clone(),
777-
memory_values.clone(),
778-
memory_types.clone(),
779-
func_names.clone(),
780-
func_par.clone(),
781-
func_code.clone(),
782-
dev,).to_string().as_str());
774+
imput_s.push_str(
775+
time_readable(
776+
y,
777+
vec.to_vec(),
778+
memory_names.clone(),
779+
memory_values.clone(),
780+
memory_types.clone(),
781+
func_names.clone(),
782+
func_par.clone(),
783+
func_code.clone(),
784+
dev,
785+
)
786+
.to_string()
787+
.as_str(),
788+
);
783789
let mut leng = 0;
784790
let mut n2 = 0;
785791
let mut skip1 = false;
@@ -1614,7 +1620,8 @@ pub fn time_readable(
16141620
func_names: Vec<String>,
16151621
func_par: Vec<String>,
16161622
func_code: Vec<String>,
1617-
dev: bool,) -> String {
1623+
dev: bool,
1624+
) -> String {
16181625
let getstirng = getstring(
16191626
x,
16201627
contents,
@@ -1628,25 +1635,22 @@ pub fn time_readable(
16281635
0,
16291636
);
16301637
if getstirng.len() > 0 {
1631-
let time:f64 = getstirng
1632-
.first()
1633-
.unwrap().parse().unwrap();
1638+
let time: f64 = getstirng.first().unwrap().parse().unwrap();
16341639
println!("{}", time);
16351640
let d = UNIX_EPOCH + Duration::from_millis(time as u64);
16361641
// Create DateTime from SystemTime
16371642
let datetime = DateTime::<Utc>::from(d);
16381643
// Formats the combined date and time with the specified format string.
16391644
let timestamp_str = datetime.format("%Y-%m-%d %H:%M:%S.%f").to_string();
1640-
return timestamp_str
1641-
}
1642-
else {
1645+
return timestamp_str;
1646+
} else {
16431647
let time = time();
16441648
let d = UNIX_EPOCH + Duration::from_millis(time as u64);
16451649
// Create DateTime from SystemTime
16461650
let datetime = DateTime::<Utc>::from(d);
16471651
// Formats the combined date and time with the specified format string.
16481652
let timestamp_str = datetime.format("%Y-%m-%d %H:%M:%S.%f").to_string();
1649-
return timestamp_str
1653+
return timestamp_str;
16501654
}
16511655
}
16521656

0 commit comments

Comments
 (0)