Skip to content

Commit

Permalink
Remove unwrap in configuration comparison
Browse files Browse the repository at this point in the history
Issue-Id: #22
  • Loading branch information
christoph-hamm committed Jul 9, 2024
1 parent 146abe8 commit 0ebbdcd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion agent/src/control_interface/pipes_channel_context_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,18 @@ impl PipesChannelContextInfo {
let self_location = self
.workload_instance_name
.pipes_folder_name(&self.run_folder);
let Some(self_location) = self_location.to_str() else {
log::warn!("Could not convert old pipes folder location to string.");
return false;
};

let other_location = other.get_api_location();
if self_location.to_str().unwrap() != other_location.to_str().unwrap() {
let Some(other_location) = other_location.to_str() else {
log::warn!("Could not convert new pipes folder location to string.");
return false;
};

if self_location != other_location {
return false;
};

Expand Down

0 comments on commit 0ebbdcd

Please sign in to comment.