mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-24 05:06:28 +00:00
fix: add tokio-test (#363)
* fix: add tokio-test
* fix: "called `unwrap` on `v` after checking its variant with `is_some`"
= help: try using `if let` or `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
= note: `-D clippy::unnecessary-unwrap` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_unwrap)]`
* fmt
* set toolchain 1.88.0
* fmt
* fix: cliip
This commit is contained in:
@@ -54,8 +54,8 @@ pub fn get_object_retention_meta(meta: HashMap<String, String>) -> ObjectLockRet
|
||||
}
|
||||
if let Some(till_str) = till_str {
|
||||
let t = OffsetDateTime::parse(till_str, &format_description::well_known::Iso8601::DEFAULT);
|
||||
if t.is_err() {
|
||||
retain_until_date = Date::from(t.expect("err")); //TODO: utc
|
||||
if let Ok(parsed_time) = t {
|
||||
retain_until_date = Date::from(parsed_time);
|
||||
}
|
||||
}
|
||||
ObjectLockRetention {
|
||||
|
||||
@@ -1897,7 +1897,7 @@ impl ReplicationState {
|
||||
} else if !self.replica_status.is_empty() {
|
||||
self.replica_status.clone()
|
||||
} else {
|
||||
return ReplicationStatusType::Unknown;
|
||||
ReplicationStatusType::Unknown
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -139,8 +139,8 @@ async fn init_format_erasure(
|
||||
let idx = i * set_drive_count + j;
|
||||
let mut newfm = fm.clone();
|
||||
newfm.erasure.this = fm.erasure.sets[i][j];
|
||||
if deployment_id.is_some() {
|
||||
newfm.id = deployment_id.unwrap();
|
||||
if let Some(id) = deployment_id {
|
||||
newfm.id = id;
|
||||
}
|
||||
|
||||
fms[idx] = Some(newfm);
|
||||
|
||||
Reference in New Issue
Block a user