mirror of
https://github.com/hexedtech/codemp.git
synced 2024-12-22 21:04:53 +01:00
feat: add version function to the client.
This commit is contained in:
parent
799123c681
commit
80219f2cce
1 changed files with 9 additions and 0 deletions
|
@ -203,4 +203,13 @@ 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})")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue