Skip to content

Commit

Permalink
Fix web feature config
Browse files Browse the repository at this point in the history
  • Loading branch information
pawurb committed Nov 22, 2024
1 parent bfab0ab commit 24ba18f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT"
name = "pg-extras"
readme = "README.md"
repository = "https://github.com/pawurb/pg-extras-rs"
version = "0.7.0"
version = "0.7.1"

exclude = ["docker-compose.yml.sample", "live_tests.sh"]

Expand Down Expand Up @@ -46,14 +46,10 @@ lto = true
[[bin]]
name = "pgextras"
path = "bin/main.rs"
required-features = ["web"]

[[example]]
name = "db_settings"
path = "examples/db_settings.rs"

[features]
web = ["dep:axum", "dep:askama", "dep:askama_axum", "dep:tower-http"]

[default]
features = ["web"]
6 changes: 3 additions & 3 deletions bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ use sqlx::PgPool;
pub enum PgSubcommand {
#[command(about = "Diagnose common database problems")]
Diagnose(EmptyArgs),
#[cfg(feature = "web")]
#[command(about = "Start UI web server")]
Web(EmptyArgs),
#[command(about = &AllLocks::description())]
AllLocks(EmptyArgs),
#[command(about = &Bloat::description())]
Expand Down Expand Up @@ -100,9 +103,6 @@ pub enum PgSubcommand {
UnusedIndexes(EmptyArgs),
#[command(about = &VacuumStats::description())]
VacuumStats(EmptyArgs),
#[cfg(feature = "web")]
#[command(about = "Start web server")]
Web(EmptyArgs),
}

#[derive(Parser, Debug)]
Expand Down

0 comments on commit 24ba18f

Please sign in to comment.