Skip to content
This repository was archived by the owner on Dec 5, 2022. It is now read-only.
This repository was archived by the owner on Dec 5, 2022. It is now read-only.

the trait bound custom::Request: ruma_api::Endpoint is not satisfied #1

@tastytea

Description

@tastytea

Hi, I'm getting the following error after git clone https://github.com/stoically/git-matrix.git && cd git-matrix && cargo install --path=git_matrix_cli:

Error message

Compiling git-matrix v0.1.0 (/var/ram/git-matrix/git_matrix)
error[E0277]: the trait bound `custom::Request: ruma_api::Endpoint` is not satisfied
   --> git_matrix/src/matrix.rs:82:22
    |
82  |               .request(events::custom::Request {
    |  ______________-------_^
    | |              |
    | |              required by a bound introduced by this call
83  | |                 room_id: self.room_id.clone(),
84  | |                 event_type: EventType::Custom(event_type.to_owned()),
85  | |                 txn_id: uuid::Uuid::new_v4().to_simple().to_string(),
86  | |                 content,
87  | |             })
    | |_____________^ the trait `ruma_api::Endpoint` is not implemented for `custom::Request`
    |
note: required by a bound in `ruma_client::Client::<C>::request`
   --> /home/tastytea/.cargo/registry/src/github.com-1ecc6299db9ec823/ruma-client-0.3.0/src/lib.rs:334:29
    |
334 |     pub fn request<Request: Endpoint>(
    |                             ^^^^^^^^ required by this bound in `ruma_client::Client::<C>::request`

error[E0277]: the trait bound `custom::Request: ruma_api::Endpoint` is not satisfied
  --> git_matrix/src/matrix.rs:81:9
   |
81 | /         self.client
82 | |             .request(events::custom::Request {
83 | |                 room_id: self.room_id.clone(),
84 | |                 event_type: EventType::Custom(event_type.to_owned()),
...  |
87 | |             })
88 | |             .await?;
   | |__________________^ the trait `ruma_api::Endpoint` is not implemented for `custom::Request`

warning: use of deprecated associated function `url::Url::into_string`: use Into<String>
  --> git_matrix/src/matrix/events.rs:8:5
   |
8  | /     ruma_api! {
9  | |         metadata {
10 | |             description: "Send a custom event to a room.",
11 | |             method: PUT,
...  |
40 | |         }
41 | |     }
   | |_____^
   |
   = note: `#[warn(deprecated)]` on by default
   = note: this warning originates in the macro `ruma_api` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.
warning: `git-matrix` (lib) generated 1 warning
error: could not compile `git-matrix` due to 2 previous errors; 1 warning emitted
warning: build failed, waiting for other jobs to finish...
error: failed to compile `git-matrix-cli v0.1.0 (/var/ram/git-matrix/git_matrix_cli)`, intermediate artifacts can be found at `/var/ram/git-matrix/target`

Build environment

% lsb_release --description --short
"Gentoo Base System release 2.7"
% cargo --version --verbose
cargo 1.58.0 (f01b232bc 2022-01-19)
release: 1.58.0
commit-hash: f01b232bc7f4d94f0c4603930a5a96277715eb8c
commit-date: 2022-01-19
host: x86_64-unknown-linux-gnu
libgit2: 1.3.0 (sys:0.13.23 vendored)
libcurl: 7.80.0-DEV (sys:0.4.51+curl-7.80.0 vendored ssl:OpenSSL/1.1.1l)
os: Linux 2.7 [64-bit]
% rustc --version --verbose
rustc 1.58.1 (db9d1b20b 2022-01-20)
binary: rustc
commit-hash: db9d1b20bba1968c1ec1fc49616d4742c1725b4b
commit-date: 2022-01-20
host: x86_64-unknown-linux-gnu
release: 1.58.1
LLVM version: 13.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions