edgedb / edgedb-rust

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

edgedb-derive does not qualify `Result` in the macro output #293

Closed CodesInChaos closed 3 months ago

CodesInChaos commented 4 months ago

Deriving Queryable uses the following return type for the function:

Result<Self, ::edgedb_protocol::errors::DecodeError>

This usually works, since Result is in the prelude. It can however cause problems if there is a conflicting definition of Result in the current module.

It should instead generate:

::std::result::Result<Self, ::edgedb_protocol::errors::DecodeError>

There is probably a similar issue concerning the use of Ok and Err in the macro output as well.