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

chore: Add spacing before and after for tui titles #706

Merged
merged 4 commits into from
Oct 31, 2024

Conversation

jeevithakannan2
Copy link
Contributor

@jeevithakannan2 jeevithakannan2 commented Sep 30, 2024

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • Refactoring
  • Hotfix
  • Security patch
  • UI/UX improvement

Description

  • Add spacing before and after titles and tips in TUI.

Before

before

After

after

Testing

  • Tested no issues.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no errors/warnings/merge conflicts.

@lj3954
Copy link
Contributor

lj3954 commented Sep 30, 2024

I would just return the String rather than leaking it. Or you could return a Box<str> if you want to drop the unnecessary capacity to save 8 bytes of memory. Box::leak is mainly useful if you're passing data between threads, or doing anything else the borrow checker wouldn't particularly like. There's no reason we'd need to leak this, and it's better to avoid calling functions with the potential of causing memory issues unless they're necessary.

tui/src/state.rs Outdated Show resolved Hide resolved
@ChrisTitusTech ChrisTitusTech merged commit 11336cf into ChrisTitusTech:main Oct 31, 2024
2 checks passed
@jeevithakannan2 jeevithakannan2 deleted the tui-spacing branch November 1, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants