diff --git a/src/client.rs b/src/client.rs index aad2b75..2d4d03a 100644 --- a/src/client.rs +++ b/src/client.rs @@ -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})") - } } diff --git a/src/lib.rs b/src/lib.rs index c60ac2f..f9172e1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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() +}