changes the position of the function to the lib folder and simplify it.

This commit is contained in:
cschen 2024-09-22 16:53:53 +02:00 committed by alemi.dev
parent 80219f2cce
commit 37347311fb
2 changed files with 7 additions and 11 deletions

View file

@ -203,13 +203,4 @@ impl Client {
pub fn user(&self) -> &User {
&self.0.user
}
/// Get the current version of the client
pub fn version() -> String {
let version = env!("CARGO_PKG_VERSION");
let name = env!("CARGO_PKG_NAME");
let license = env!("CARGO_PKG_LICENSE");
format!("{name} - {version} ({license})")
}
}

View file

@ -121,3 +121,8 @@ pub mod ffi;
/// internal network services and interceptors
pub(crate) mod network;
/// Get the current version of the client
pub fn version() -> String {
env!("CARGO_PKG_VERSION").to_owned()
}