Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functions to print a message and symbol after stopping #29

Merged
merged 5 commits into from
Jun 17, 2022

Conversation

AnishDe12020
Copy link
Contributor

Closes #28

I have added a stop_and_persist function that stops the spinner and then shows a symbol and a message. I have also added succeed, fail, warn, info, and unknown functions that use the stop_and_persist function with a pre-defined symbol (with color and, theoretically, support for windows terminals).

Note: I might also push out some more features in this pr if it is going to take time (so that there arent many prs from me that sit unmerged). Do let me know if I should use any other approach

Cargo.toml Outdated
@@ -17,3 +17,4 @@ include = ["src/**/*", "README.md"]
lazy_static = { version = "1.4.0" }
maplit = { version = "1.0.2" }
strum = { version = "0.24.0", features = ["derive"] }
terminal-log-symbols = "0.1.6"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer not to add another dependency, could we just keep your changes on stop_and_persist and stop_with_message? Thanks :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will revert the commits

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@FGRibreau FGRibreau merged commit ce6bf7a into FGRibreau:master Jun 17, 2022
@AnishDe12020 AnishDe12020 deleted the feat/new-stuff branch June 17, 2022 14:21
@FGRibreau
Copy link
Owner

Thanks a lot @AnishDe12020!

Released in v4.1.0 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Function to add a symbol as well as text to the spinner
2 participants