Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
infiniteregrets committed Sep 19, 2024
1 parent 3b98813 commit 0c5d333
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dirs = "5.0.1"
serde = { version = "1.0.210", features = ["derive"] }
thiserror = "1.0.63"
toml = "0.8.19"
s2 = { git = "ssh://git@github.com/s2-streamstore/s2.rs.git", branch = "fromstr" }
s2 = { git = "ssh://git@github.com/s2-streamstore/s2.rs.git", branch = "main" }
tokio = { version = "*", features = ["full"] }
humantime = "2.1.0"
miette = { version = "7.2.0", features = ["fancy"] }
2 changes: 1 addition & 1 deletion src/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl AccountService {
}

pub async fn delete_basin(&self, name: String) -> Result<(), AccountServiceError> {
let delete_basin_req = s2::types::DeleteBasinRequest { basin: name };
let delete_basin_req = s2::types::DeleteBasinRequest::builder().basin(name).build();
self.client.delete_basin(delete_basin_req).await?;
Ok(())
}
Expand Down
13 changes: 1 addition & 12 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,7 @@ static HELP: OnceLock<String> = OnceLock::new();
fn get_help() -> &'static str {
HELP.get_or_init(|| {
format!(
r#"
{}
► {}
{}
► {}
{}
► {}
{}
"#,
"\n{}\n\n ► {}\n{}\n\n ► {}\n{}\n\n ► {}\n{}",
"Notice something wrong?".cyan().bold(),
"Open an issue:".green(),
"https://github.com/s2-cli/issues".bold(),
Expand Down
8 changes: 3 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use colored::*;
use config::{config_path, create_config};
use error::S2CliError;
use s2::{
client::{Client, ClientConfig, Cloud},
client::{Client, ClientConfig, HostCloud},
types::StorageClass,
};

Expand Down Expand Up @@ -83,14 +83,12 @@ enum AccountActions {

async fn s2_client(token: String) -> Result<Client, S2CliError> {
let config = ClientConfig::builder()
.url(Cloud::Local)
.host_uri(HostCloud::Local)
.token(token.to_string())
.connection_timeout(std::time::Duration::from_secs(5))
.build();

let bro = Client::connect(config).await?;
println!("{:?}", bro);
Ok(bro)
Ok(Client::connect(config).await?)
}

#[tokio::main]
Expand Down

0 comments on commit 0c5d333

Please sign in to comment.