Use a context struct
This commit is contained in:
parent
60208331ba
commit
a0d9bfa97b
10 changed files with 134 additions and 45 deletions
|
@ -1,9 +1,9 @@
|
|||
use color_eyre::eyre::Result;
|
||||
|
||||
use crate::Client;
|
||||
use crate::context::Context;
|
||||
|
||||
pub async fn server_version(client: &Client) -> Result<()> {
|
||||
let version = client.get_server_version().await?;
|
||||
pub async fn server_version(ctx: Context) -> Result<()> {
|
||||
let version = ctx.client.get_server_version().await?;
|
||||
println!("{}.{}.{}", version.major, version.minor, version.patch);
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue