edgedb / edgedb-rust

The official Rust binding for EdgeDB
https://edgedb.com
Apache License 2.0
214 stars 26 forks source link

`Json::new_unchecked` should not be `unsafe` #270

Closed XAMPPRocky closed 1 year ago

XAMPPRocky commented 1 year ago

Currently Json::new_unchecked is marked as unsafe, however this is an incorrect usage of unsafe, as using the method would not cause memory safety bugs, it would cause application safety bugs. unsafe is scoped to just memory safety issues, and the method already mentions unchecked so the unsafe designation should be removed.

Dhghomon commented 1 year ago

Closing now as this function is no longer an unsafe fn.