mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-05-14 11:03:31 +00:00
dragonball: Remove unnecessary unwrap
Given that we call `is_some` earlier, we don't then need to unwrap, so refactor to avoid this Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
@@ -352,8 +352,7 @@ impl Endpoint {
|
||||
// base is not zero any more. So don't set queue base on reconnection.
|
||||
// N.B. it's really TDD, we just found it works in this way. Any spec about this?
|
||||
for queue_index in 0..queue_num {
|
||||
let base = if old.is_some() {
|
||||
let conn = old.as_mut().unwrap();
|
||||
let base = if let Some(conn) = &mut old {
|
||||
match conn.get_vring_base(queue_index) {
|
||||
Ok(val) => Some(val),
|
||||
Err(_) => None,
|
||||
|
||||
Reference in New Issue
Block a user