Skip to content

Commit 2bf63af

Browse files
metamejoepio
authored andcommitted
no unwrap
1 parent db52521 commit 2bf63af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/files.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ impl FileStore {
3636

3737
pub fn init_from_config(config: &Config, fs_file_store: FileStore) -> FileStore {
3838
let opts = &config.opts;
39-
if opts.s3_bucket.is_some() {
39+
if let Some(bucket) = &opts.s3_bucket {
4040
let config = S3Config {
41-
bucket: opts.s3_bucket.clone().unwrap(),
41+
bucket: bucket.clone(),
4242
endpoint: opts.s3_endpoint.clone(),
4343
region: opts.s3_region.clone(),
4444
path: opts.s3_path.clone().unwrap_or("uploads".to_string()),

0 commit comments

Comments
 (0)