Skip to content

Commit

Permalink
chore: inline path consts for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
shikhar committed Dec 26, 2024
1 parent 9c7f28a commit 35e5b60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
9 changes: 3 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ use tokio_stream::{
};
use tracing::trace;
use tracing_subscriber::{fmt::format::FmtSpan, layer::SubscriberExt, util::SubscriberInitExt};
use types::{
BasinConfig, S2BasinAndMaybeStreamUri, S2BasinAndStreamUri, S2BasinUri, StreamConfig,
RETENTION_POLICY_PATH, STORAGE_CLASS_PATH,
};
use types::{BasinConfig, S2BasinAndMaybeStreamUri, S2BasinAndStreamUri, S2BasinUri, StreamConfig};

mod account;
mod basin;
Expand Down Expand Up @@ -516,10 +513,10 @@ async fn run() -> Result<(), S2CliError> {
let mut mask = Vec::new();
if let Some(config) = &config.default_stream_config {
if config.storage_class.is_some() {
mask.push(STORAGE_CLASS_PATH.to_string());
mask.push("default_stream_config.storage_class".to_owned());
}
if config.retention_policy.is_some() {
mask.push(RETENTION_POLICY_PATH.to_string());
mask.push("default_stream_config.retention_policy".to_owned());
}
}

Expand Down
3 changes: 0 additions & 3 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ use std::{str::FromStr, time::Duration};

use crate::error::S2UriParseError;

pub const STORAGE_CLASS_PATH: &str = "default_stream_config.storage_class";
pub const RETENTION_POLICY_PATH: &str = "default_stream_config.retention_policy";

#[derive(Debug, Clone)]
struct S2Uri {
basin: BasinName,
Expand Down

0 comments on commit 35e5b60

Please sign in to comment.