build: make regex optional and gated by server feature
This commit is contained in:
parent
837f120621
commit
6489ac604e
@ -12,7 +12,7 @@ deadpool-postgres = { version = "0.14", optional = true }
|
|||||||
argon2 = { version = "0.5", optional = true }
|
argon2 = { version = "0.5", optional = true }
|
||||||
uuid = { version = "1", features = ["v4", "js"], optional = true }
|
uuid = { version = "1", features = ["v4", "js"], optional = true }
|
||||||
chrono = { version = "0.4", features = ["serde"] }
|
chrono = { version = "0.4", features = ["serde"] }
|
||||||
regex = "1.12"
|
regex = { version = "1.12", optional = true }
|
||||||
pulldown-cmark = "0.13"
|
pulldown-cmark = "0.13"
|
||||||
dotenvy = { version = "0.15", optional = true }
|
dotenvy = { version = "0.15", optional = true }
|
||||||
tracing = { version = "0.1", optional = true, features = ["release_max_level_info"] }
|
tracing = { version = "0.1", optional = true, features = ["release_max_level_info"] }
|
||||||
@ -62,6 +62,7 @@ server = [
|
|||||||
"dep:deadpool-postgres",
|
"dep:deadpool-postgres",
|
||||||
"dep:argon2",
|
"dep:argon2",
|
||||||
"dep:uuid",
|
"dep:uuid",
|
||||||
|
"dep:regex",
|
||||||
"dep:dotenvy",
|
"dep:dotenvy",
|
||||||
"dep:tracing",
|
"dep:tracing",
|
||||||
"dep:tracing-subscriber",
|
"dep:tracing-subscriber",
|
||||||
|
|||||||
@ -78,7 +78,7 @@ pub fn auto_summary(md: &str) -> String {
|
|||||||
plain.chars().take(200).collect()
|
plain.chars().take(200).collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(all(test, feature = "server"))]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user