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
fix(block and several others): deprecate title struct, it's position, and related functions #1061
base: main
Are you sure you want to change the base?
Conversation
fd8edfc
to
2563e09
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1061 +/- ##
=======================================
- Coverage 94.3% 94.2% -0.1%
=======================================
Files 61 61
Lines 14768 14770 +2
=======================================
- Hits 13932 13922 -10
- Misses 836 848 +12 ☔ View full report in Codecov by Sentry. |
… and related functions
ed89a4f
to
4a9e1b6
Compare
I've added fn foo(position: Position) -> Block {
Block::new().title(Title::from("bar").position(position))
} would have to write their own enum since |
Forgot mention issue #738 |
I've deprecated
Title
, thetitle()
function,Position
, and thetitles_position()
function, and adapted the docs to havetitle_top()
andtitle_bottom()
in examples. While it was suggested to addtop_title()
andbottom_title()
, and deprecate the old ones, there's no need becausetitle_top()
andtitle_bottom()
have the same signatures, as the new functions would. It was also suggested that we add thetop_titles
andbottom_titles
fields, this is currently not possible since thetitle()
function supports having titles with no position. So we should rather add the fields after removing the deprecations. I was forced to add#![cfg_attr(test, allow(deprecated)]
tolib.rs
due to a rust bug. And you can ignoreflake.nix
andflake.lock
, it's for Nix users, as I've switched to NixOS recently.