Xo is experimental. The source is now public on GitHub, or try Xo in your browser.
Menu · XO0912

Docs

XO0912: retired: `uuid.Uuid`'s text read or built directly

warning · reported by the vet

xo vet reported this warning in 0.33.0, when a uuid.Uuid was a newtype over its canonical text. Since 0.34.0 it is two Ints (its 128 bits): there is no .0 and no construction from a text, so the checker rejects those uses and vet no longer reports the code. u.display() (or "${u}") gives the text, uuid.parse(s) checks a text and makes a Uuid, u < v orders Uuids as their bytes.

Example

let key = id.0

Fix

let key = id.display()

Run xo explain XO0912 for this text in a terminal, or see section 10.6 of the specification.