mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
remove conduit_bin feature
This commit is contained in:
parent
f27941d510
commit
0f7b6d482c
3 changed files with 2 additions and 8 deletions
|
|
@ -30,7 +30,7 @@ workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# Web framework
|
# Web framework
|
||||||
axum = { version = "0.6.18", default-features = false, features = ["form", "headers", "http1", "http2", "json", "matched-path"], optional = true }
|
axum = { version = "0.6.18", default-features = false, features = ["form", "headers", "http1", "http2", "json", "matched-path"] }
|
||||||
axum-server = { version = "0.5.1", features = ["tls-rustls"] }
|
axum-server = { version = "0.5.1", features = ["tls-rustls"] }
|
||||||
tower = { version = "0.4.13", features = ["util"] }
|
tower = { version = "0.4.13", features = ["util"] }
|
||||||
tower-http = { version = "0.4.1", features = ["add-extension", "cors", "sensitive-headers", "trace", "util"] }
|
tower-http = { version = "0.4.1", features = ["add-extension", "cors", "sensitive-headers", "trace", "util"] }
|
||||||
|
|
@ -121,18 +121,16 @@ features = [
|
||||||
nix = { version = "0.28", features = ["resource"] }
|
nix = { version = "0.28", features = ["resource"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["conduit_bin", "backend_sqlite", "backend_rocksdb", "systemd"]
|
default = ["backend_sqlite", "backend_rocksdb", "systemd"]
|
||||||
backend_sqlite = ["sqlite"]
|
backend_sqlite = ["sqlite"]
|
||||||
backend_rocksdb = ["rocksdb"]
|
backend_rocksdb = ["rocksdb"]
|
||||||
jemalloc = ["tikv-jemalloc-ctl", "tikv-jemallocator"]
|
jemalloc = ["tikv-jemalloc-ctl", "tikv-jemallocator"]
|
||||||
sqlite = ["rusqlite", "parking_lot", "tokio/signal"]
|
sqlite = ["rusqlite", "parking_lot", "tokio/signal"]
|
||||||
conduit_bin = ["axum"]
|
|
||||||
systemd = ["sd-notify"]
|
systemd = ["sd-notify"]
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "conduit"
|
name = "conduit"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
required-features = ["conduit_bin"]
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "conduit"
|
name = "conduit"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ use ruma::{
|
||||||
};
|
};
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
|
|
||||||
#[cfg(feature = "conduit_bin")]
|
|
||||||
mod axum;
|
mod axum;
|
||||||
|
|
||||||
/// Extractor for Ruma request structs
|
/// Extractor for Ruma request structs
|
||||||
|
|
|
||||||
|
|
@ -64,10 +64,8 @@ pub enum Error {
|
||||||
BadRequest(ErrorKind, &'static str),
|
BadRequest(ErrorKind, &'static str),
|
||||||
#[error("{0}")]
|
#[error("{0}")]
|
||||||
Conflict(&'static str), // This is only needed for when a room alias already exists
|
Conflict(&'static str), // This is only needed for when a room alias already exists
|
||||||
#[cfg(feature = "conduit_bin")]
|
|
||||||
#[error("{0}")]
|
#[error("{0}")]
|
||||||
ExtensionError(#[from] axum::extract::rejection::ExtensionRejection),
|
ExtensionError(#[from] axum::extract::rejection::ExtensionRejection),
|
||||||
#[cfg(feature = "conduit_bin")]
|
|
||||||
#[error("{0}")]
|
#[error("{0}")]
|
||||||
PathError(#[from] axum::extract::rejection::PathRejection),
|
PathError(#[from] axum::extract::rejection::PathRejection),
|
||||||
#[error("{0}")]
|
#[error("{0}")]
|
||||||
|
|
@ -160,7 +158,6 @@ impl From<Infallible> for Error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "conduit_bin")]
|
|
||||||
impl axum::response::IntoResponse for Error {
|
impl axum::response::IntoResponse for Error {
|
||||||
fn into_response(self) -> axum::response::Response {
|
fn into_response(self) -> axum::response::Response {
|
||||||
self.to_response().into_response()
|
self.to_response().into_response()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue