chore(breaking-changes): add details to no_std-related breaking changes (#1828)
Some corrections and added details to BREAKING-CHANGES.md. I decided to remove: - `Backend` now uses `Self::Error` for error handling instead of `std::io::Error` - `Terminal<B>` now uses `B::Error` for error handling instead of `std::io::Error` ...as we are still using `std::io::Error` in built-in backends, so this will only be breaking if a third-party backend decides to use a custom error other than `std::io::Error`, which would be a breaking change in downstream and not `ratatui`. The exception to that is `TestBackend`, which uses `Infallible`, but this already has its own breaking changes entry.
This commit is contained in:
committed by
GitHub
parent
8d60e96b2b
commit
b46778dd1d
@@ -17,8 +17,6 @@ This is a quick summary of the sections below:
|
||||
- 'layout::Alignment' is renamed to 'layout::HorizontalAlignment'
|
||||
- The MSRV is now 1.81.0
|
||||
- `Backend` now requires an associated `Error` type and `clear_region` method
|
||||
- `Backend` now uses `Self::Error` for error handling instead of `std::io::Error`
|
||||
- `Terminal<B>` now uses `B::Error` for error handling instead of `std::io::Error`
|
||||
- `TestBackend` now uses `core::convert::Infallible` for error handling instead of `std::io::Error`
|
||||
- Disabling `default-features` will now disable layout cache, which can have a negative impact on performance
|
||||
- `Layout::init_cache` and `Layout::DEFAULT_CACHE_SIZE` are now only available if `layout-cache` feature is enabled
|
||||
@@ -121,6 +119,16 @@ re-enable layout cache. Not doing so may impact performance.
|
||||
Since `TestBackend` never fails, it now uses `Infallible` as associated `Error`. This may require
|
||||
changes in test cases that use `TestBackend`.
|
||||
|
||||
### `Backend` now requires an associated `Error` type and `clear_region` method ([#1778])
|
||||
|
||||
[#1778]: https://github.com/ratatui/ratatui/pull/1778
|
||||
|
||||
Custom `Backend` implementations must now define an associated `Error` type for method `Result`s
|
||||
and implement the `clear_region` method, which no longer has a default implementation.
|
||||
|
||||
This change was made to provide greater flexibility for custom backends, particularly to remove the
|
||||
explicit dependency on `std::io` for backends that want to support `no_std` targets.
|
||||
|
||||
### The MSRV is now 1.81.0 ([#1786])
|
||||
|
||||
[#1786]: https://github.com/ratatui/ratatui/pull/1786
|
||||
|
||||
Reference in New Issue
Block a user