Skip to content

Commit

Permalink
refactor(term): use bitflags to manage app flags
Browse files Browse the repository at this point in the history
  • Loading branch information
ymgyt committed May 4, 2024
1 parent 979231e commit aa2d6c4
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 52 deletions.
17 changes: 9 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ async-graphql = { version = "7.0" }
async-trait = { version = "0.1.79", default-features = false }
axum = { version = "0.7.5", default-features = false }
axum-server = { version = "0.6.0", features = ["tls-rustls"] }
bitflags = { version = "2.5.0", default-features = false }
chrono = { version = "0.4.31", default-features = false }
clap = { version = "4.5", default-features = false }
fdlimit = { version = "0.3.0", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions crates/synd_term/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ synd-feed = { path = "../synd_feed", version = "0.3.1" }
synd-o11y = { path = "../synd_o11y", version = "0.1.5" }

anyhow = { workspace = true }
bitflags = { workspace = true }
chrono = { workspace = true, features = ["std", "now", "serde"] }
clap = { workspace = true, features = ["derive", "string", "color", "suggestions", "wrap_help", "env", "std"] }
crossterm = { version = "0.27.0", features = ["event-stream"] }
Expand Down
9 changes: 9 additions & 0 deletions crates/synd_term/src/application/flags.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use bitflags::bitflags;

bitflags! {
pub(super) struct Should: u64 {
const Render = 1 << 0;
const Quit = 1 << 1;

}
}

0 comments on commit aa2d6c4

Please sign in to comment.