fernandobatels / rsfbclient

Rust Firebird Client
MIT License
76 stars 11 forks source link

IntoParams, multiple usage. #123

Closed nt202 closed 2 years ago

nt202 commented 2 years ago

Hello, how to use IntoParams more than once? (I am new to Rust)

image
error[E0252]: the name `ParamsType` is defined multiple times
  --> src/repo/authentic_repo.rs:30:10
   |
24 | #[derive(IntoParams, Message)]
   |          ---------- previous import of the type `ParamsType` here
...
30 | #[derive(IntoParams, Message)]
   |          ^^^^^^^^^^
   |          |
   |          `ParamsType` reimported here
   |          help: remove unnecessary import

24 | #[derive(IntoParams, Message)]
   |          ---------- previous import of the type `HashMap` here
...
30 | #[derive(IntoParams, Message)]
   |          ^^^^^^^^^^ `HashMap` reimported here
fernandobatels commented 2 years ago

Apparently this is a bug. I will fix. Please, isolate your structs with submodules for now.

Example:

pub mod mod1 {
 use rsfbclient::{prelude::*, FbError};
 pub struct UserExists...
}

pub mod mod2 {
 use rsfbclient::{prelude::*, FbError};
 pub struct PasswordCorrect...
}
nt202 commented 2 years ago

Thank you :)

fernandobatels commented 2 years ago

0.19.0 released, please check the new version

nt202 commented 2 years ago

@fernandobatels, Thank you! It doesn't complain anymore, but I have a question, https://crates.io/crates/r2d2_firebird has not been updated?

fernandobatels commented 2 years ago

https://crates.io/crates/r2d2_firebird has not been updated?

This crate is not building anymore with recents rust versions. I will check this tonight.