aboutsummaryrefslogtreecommitdiff
path: root/ticket/src/actions.rs
diff options
context:
space:
mode:
authorMichael Gattozzi <mgattozzi@gmail.com>2019-12-20 21:25:55 -0500
committerMichael Gattozzi <mgattozzi@gmail.com>2019-12-20 21:25:55 -0500
commit50badce3dd78dde6baab913ea6af74966af526d3 (patch)
tree5e9794305566c372e5df15243709c217bf697376 /ticket/src/actions.rs
parent82faafde2c493a4a61fcf71e6c650552699053e7 (diff)
Upgrade tui to allow commenting from it
This is a fairly large overhaul of ticket but lays down the last bit of groundwork needed before an initial release. It handles input to write comments, refactors the code a bit to be cleaner and less computation heavy, and also adds instructions on the bottom for how to use the tui. This should be enough for people to start using it, though obviously there's more work to go, but it feels more usable than before.
Diffstat (limited to 'ticket/src/actions.rs')
-rw-r--r--ticket/src/actions.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/ticket/src/actions.rs b/ticket/src/actions.rs
index d2ebf24..42f360b 100644
--- a/ticket/src/actions.rs
+++ b/ticket/src/actions.rs
@@ -119,8 +119,7 @@ pub fn uuid_v1() -> Result<Uuid> {
)?)
}
-#[allow(clippy::needless_pass_by_value)]
-pub fn save_ticket(ticket: Ticket) -> Result<()> {
+pub fn save_ticket(ticket: &Ticket) -> Result<()> {
fs::write(ticket_path(&ticket)?, toml::to_string_pretty(&ticket)?)?;
Ok(())
}