Incomplete requirements #2

Closed
opened 2024-02-20 21:25:20 +00:00 by DragonPixel1 · 2 comments
DragonPixel1 commented 2024-02-20 21:25:20 +00:00 (Migrated from gitlab.com)

Hey, I just found a small issue where this crate also needs uuid crate to be added to the cargo.toml file even if you don't make use of the crate.

Eg When making a search index for the following struct

#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct Song {
    pub code: u64,
    pub instructor: String,
    pub song: String,
    pub artist: String
}

The project does not compile.

.../leptos_meilisearch-0.2.0/src/error.rs:88:12
   |
88 |     Uuid(#[from] uuid::Error),
   |            ^^^^ method cannot be called on `&Error` due to unsatisfied trait bounds
  ::: .../uuid-1.7.0/src/error.rs:5:1
   |
5  | pub struct Error(pub(crate) ErrorKind);
   | ----------------
   | |
   | doesn't satisfy `uuid::Error: AsDynError<'_>`
   | doesn't satisfy `uuid::Error: StdError`
   |

  = note: the following trait bounds were not satisfied:
           `uuid::Error: StdError`
           which is required by `uuid::Error: AsDynError<'_>`
           `&uuid::Error: StdError`
           which is required by `&uuid::Error: AsDynError<'_>`

cargo add uuid fixed the problem.

I will make a PR with changes to the readme documenting that if that works?

(Ty for updating to work with Leptos 0.6! managed to work out some other issues and nice to see it working well!)

Hey, I just found a small issue where this crate also needs uuid crate to be added to the cargo.toml file even if you don't make use of the crate. Eg When making a search index for the following struct ``` #[derive(Debug, Clone, PartialEq, Deserialize)] pub struct Song { pub code: u64, pub instructor: String, pub song: String, pub artist: String } ``` The project does not compile. ``` .../leptos_meilisearch-0.2.0/src/error.rs:88:12 | 88 | Uuid(#[from] uuid::Error), | ^^^^ method cannot be called on `&Error` due to unsatisfied trait bounds ::: .../uuid-1.7.0/src/error.rs:5:1 | 5 | pub struct Error(pub(crate) ErrorKind); | ---------------- | | | doesn't satisfy `uuid::Error: AsDynError<'_>` | doesn't satisfy `uuid::Error: StdError` | = note: the following trait bounds were not satisfied: `uuid::Error: StdError` which is required by `uuid::Error: AsDynError<'_>` `&uuid::Error: StdError` which is required by `&uuid::Error: AsDynError<'_>` ``` `cargo add uuid` fixed the problem. I will make a PR with changes to the readme documenting that if that works? (Ty for updating to work with Leptos 0.6! managed to work out some other issues and nice to see it working well!)
DragonPixel1 commented 2024-02-20 21:34:40 +00:00 (Migrated from gitlab.com)

mentioned in merge request !2

mentioned in merge request !2
kerkmann commented 2024-05-24 21:58:28 +00:00 (Migrated from gitlab.com)

Thank you very much, I removed uuid completely (which is in my opinion a better solution). 😄

Thank you very much, I removed `uuid` completely (which is in my opinion a better solution). :smile:
Sign in to join this conversation.
No labels
WIP
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kerkmann/leptos_meilisearch#2
No description provided.