Skip to content

Commit 999ac52

Browse files
committed
Update instance.rs
1 parent c8c41a6 commit 999ac52

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/epsilon/server/instance.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ pub trait VectorOfInstance {
189189
#[async_trait]
190190
impl VectorOfInstance for Vec<Instance> {
191191
async fn get_available_slots(&self) -> EResult<i32> {
192+
if self.is_empty() {
193+
return Err(format_err!("No instances found"));
194+
}
195+
192196
let mut available_slots = 0;
193197

194198
for instance in self {

0 commit comments

Comments
 (0)