#SQLX 0.6 features just not working?

5 messages · Page 1 of 1 (latest)

wooden barn
#

So SQLX 0.6 introduced some cool features like flatten and try_from and IpAddr (for pg) but none of them work, why?

#

try_from gives expected u16, found i32 for:

#[derive(FromRow)]
struct Example {
    #[sqlx(try_from = "i32")]
    example: u16
}```
then `IpAddr` stuff gives `expected enum IpAddr, found enum IpNetwork` for:
```rust
#[derive(FromRow)]
pub struct AnotherExample {
    pub origin_ip: IpAddr,
}```
#

try_from gives expected u16, found i32 for:

#[derive(FromRow)]
struct Example {
    #[sqlx(try_from = "i32")]
    example: u16
}```
then `IpAddr` stuff gives `expected enum IpAddr, found enum IpNetwork` for:
```rust
#[derive(FromRow)]
pub struct AnotherExample {
    pub origin_ip: IpAddr,
}```
#

none of this is inside a flatten, its just basic fromrow structs. flatten doesnt work at all. my deps are 0.6 and ive cleared out my target/ dir and rebuilt entirely but the 0.6 features simply just arent there

#

oh, heres some more info for try_from dying: