Skip to content

Commit

Permalink
Fix clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
reneklacan committed May 8, 2024
1 parent 936c7db commit 46bfe91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct DataStorageConfig {
/// Rustus data directory
///
/// This directory is used to store files
/// for all *file_storage storages.
/// for all *`file_storage` storages.
#[arg(long, env = "RUSTUS_DATA_DIR", default_value = "./data")]
pub data_dir: PathBuf,

Expand Down Expand Up @@ -203,7 +203,7 @@ pub struct AMQPHooksOptions {
)]
pub hooks_amqp_queues_prefix: String,

/// Maximum number of connections for RabbitMQ.
/// Maximum number of connections for `RabbitMQ`.
#[arg(
long,
env = "RUSTUS_HOOKS_AMQP_CONNECTION_POOL_SIZE",
Expand Down Expand Up @@ -314,7 +314,7 @@ pub struct SentryConfig {
#[arg(name = "sentry-environment", long, env = "RUSTUS_SENTRY_ENVIRONMENT")]
pub environment: Option<String>,

/// DEvelopment option for sentry.
/// Development option for sentry.
///
/// This option enables logging of sentry events,
/// which is useful for debugging. But it is not recommended
Expand Down
7 changes: 2 additions & 5 deletions src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,8 @@ async fn add_tus_header(
.collect::<Vec<String>>()
.join(",");

match extensions.parse() {
Ok(val) => {
resp.headers_mut().insert("Tus-Extension", val);
}
Err(_) => (),
if let Ok(val) = extensions.parse() {
resp.headers_mut().insert("Tus-Extension", val);
};

if state.tus_extensions.contains(&TusExtensions::Checksum) {
Expand Down

0 comments on commit 46bfe91

Please sign in to comment.