Skip to content

Commit f8c6f03

Browse files
authored
refactor: replace unsafe unwrap() calls with expect() containing context (#93)
1 parent 8fdf1df commit f8c6f03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cortex-exec/src/runner.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,11 @@ impl ExecRunner {
187187
self.client = Some(client);
188188
}
189189

190-
Ok(self.client.as_ref().unwrap().as_ref())
190+
Ok(self
191+
.client
192+
.as_ref()
193+
.expect("ModelClient should be initialized before use")
194+
.as_ref())
191195
}
192196

193197
/// Get filtered tool definitions based on options.

0 commit comments

Comments
 (0)