cirruslabs / tart

macOS and Linux VMs on Apple Silicon to use in CI and other automations
https://tart.run
Other
3.8k stars 112 forks source link

VMDirectory.state() should probably return an enum #782

Closed bartekpacia closed 5 months ago

bartekpacia commented 5 months ago

Code in question:

https://github.com/cirruslabs/tart/blob/13e7794bfc08b3d4913984ddfbd4d3ede7674239/Sources/tart/VMDirectory.swift#L50-L58

This looks like it could be rewritten to:

enum State {
  case Running
  case Suspended
  case Stopped
}

I found this while working on #778.