mirror of
https://github.com/hexedtech/codemp.git
synced 2024-12-22 21:04:53 +01:00
changes the position of the function to the lib folder and simplify it.
This commit is contained in:
parent
80219f2cce
commit
37347311fb
2 changed files with 7 additions and 11 deletions
|
@ -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})")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
//! The library also provides ready-to-use bindings in a growing number of other programming languages,
|
||||
//! to support a potentially infinite number of editors.
|
||||
//!
|
||||
//! # Overview
|
||||
//! # Overview
|
||||
//! The main entrypoint is [`Client::connect`], which establishes an authenticated connection with
|
||||
//! a supported remote server and returns a [`Client`] handle to interact with it.
|
||||
//!
|
||||
|
@ -75,7 +75,7 @@
|
|||
//! # };
|
||||
//! ```
|
||||
//!
|
||||
//! ## FFI
|
||||
//! ## FFI
|
||||
//! As mentioned, we provide bindings in various programming languages. To obtain them, you can
|
||||
//! compile with the appropriate feature flag. Currently, the following are supported:
|
||||
//! * `lua`
|
||||
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue