Skip to content

Commit f0867d2

Browse files
committed
Updated version
1 parent 74320b5 commit f0867d2

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[package]
22
name = "rts"
3-
version = "0.2.0"
43
edition = "2021"
54
authors = ["miruji <miruji@protonmail.com>"]
65
description = "Reactive scripting language of free data structures"

src/main.rs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,7 @@ pub static mut _argv: Vec<String> = Vec::new(); // arguments vector
4444
pub static mut _exitCode: i32 = 0; // Значение которое вернёт программа при завершении;
4545
pub static mut _exit: bool = false; // Завершилась ли программа ?
4646
// version
47-
lazy_static!
48-
{
49-
pub static ref _version: String = getVersion(env!("CARGO_PKG_VERSION"));
50-
}
51-
// get cargo version
52-
fn getVersion(version: &str) -> String
53-
{
54-
let mut result: String = String::new();
55-
56-
let digits: Vec<&str> = version.split('.').collect();
57-
let digitsSize: usize = digits.len()-1;
58-
let mut i: usize = 0;
59-
60-
while i < digitsSize
61-
{
62-
let digit = digits[i];
63-
if digit != "0" { result.push_str(digit); }
64-
if i < digitsSize { result.push('.'); }
65-
i += 1;
66-
}
67-
result
68-
}
47+
pub static _version: &str = "231206.0";
6948
// help
7049
fn help() -> ()
7150
{
@@ -121,7 +100,7 @@ async fn main() -> io::Result<()>
121100
{
122101
"version" =>
123102
{ // get version
124-
log("ok", &format!("RTS v{}", *_version));
103+
log("ok", &format!("RTS v{}", _version));
125104
logExit(0);
126105
}
127106
"help" => help(),

0 commit comments

Comments
 (0)