mirror of
https://github.com/ratatui/ratatui.git
synced 2025-09-28 13:31:14 +00:00
refactor(clippy): enable breaking lint checks (#988)
We need to make sure to not change existing methods without a notice. But at the same time this also finds public additions with mistakes before they are even released which is what I would like to have. This renames a method and deprecated the old name hinting to a new name. Should this be mentioned somewhere, so it's added to the release notes? It's not breaking because the old method is still there.
This commit is contained in:
parent
2cfe82a47e
commit
9bd89c218a
@ -1,3 +1,5 @@
|
|||||||
|
avoid-breaking-exported-api = false
|
||||||
|
|
||||||
# https://rust-lang.github.io/rust-clippy/master/index.html#/multiple_crate_versions
|
# https://rust-lang.github.io/rust-clippy/master/index.html#/multiple_crate_versions
|
||||||
# ratatui -> bitflags v2.3
|
# ratatui -> bitflags v2.3
|
||||||
# termwiz -> wezterm-blob-leases -> mac_address -> nix -> bitflags v1.3.2
|
# termwiz -> wezterm-blob-leases -> mac_address -> nix -> bitflags v1.3.2
|
||||||
|
@ -119,6 +119,7 @@ impl Rect {
|
|||||||
/// Returns a new `Rect` inside the current one, with the given margin on each side.
|
/// Returns a new `Rect` inside the current one, with the given margin on each side.
|
||||||
///
|
///
|
||||||
/// If the margin is larger than the `Rect`, the returned `Rect` will have no area.
|
/// If the margin is larger than the `Rect`, the returned `Rect` will have no area.
|
||||||
|
#[allow(clippy::trivially_copy_pass_by_ref)] // See PR #1008
|
||||||
#[must_use = "method returns the modified value"]
|
#[must_use = "method returns the modified value"]
|
||||||
pub const fn inner(self, margin: &Margin) -> Self {
|
pub const fn inner(self, margin: &Margin) -> Self {
|
||||||
let doubled_margin_horizontal = margin.horizontal.saturating_mul(2);
|
let doubled_margin_horizontal = margin.horizontal.saturating_mul(2);
|
||||||
|
@ -30,6 +30,7 @@ use crate::{prelude::*, widgets::Block};
|
|||||||
/// # See also
|
/// # See also
|
||||||
///
|
///
|
||||||
/// - [`LineGauge`] for a thin progress bar
|
/// - [`LineGauge`] for a thin progress bar
|
||||||
|
#[allow(clippy::struct_field_names)] // gauge_style needs to be differentiated to style
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct Gauge<'a> {
|
pub struct Gauge<'a> {
|
||||||
block: Option<Block<'a>>,
|
block: Option<Block<'a>>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user