mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 05:45:24 +00:00
fix(schema): restore limit on line-length (#7883)
## Summary Restores functionality of #7875 but in the correct place. Closes #7877. ~~I couldn't figure out how to get cargo fmt to work, so hopefully that's run in CI.~~ Nevermind, figured it out. ## Test Plan Can see output of json.
This commit is contained in:
parent
d54cabd276
commit
097b654ba7
2 changed files with 4 additions and 1 deletions
|
@ -15,7 +15,9 @@ use ruff_text_size::TextSize;
|
|||
/// The allowed range of values is 1..=320
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
pub struct LineLength(NonZeroU16);
|
||||
pub struct LineLength(
|
||||
#[cfg_attr(feature = "schemars", schemars(range(min = 1, max = 320)))] NonZeroU16,
|
||||
);
|
||||
|
||||
impl LineLength {
|
||||
/// Maximum allowed value for a valid [`LineLength`]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue