Extend max tab-width to 64

pull/8758/head
chtenb 1 year ago
parent 620dfceb84
commit 6ef095e2d3

@ -21,8 +21,9 @@ pub enum IndentStyle {
} }
// 16 spaces // 16 spaces
const INDENTS: &str = " "; // TODO: up this to 64 or something
pub const MAX_INDENT: u8 = 16; const INDENTS: &str = " ";
pub const MAX_INDENT: u8 = 64;
impl IndentStyle { impl IndentStyle {
/// Creates an `IndentStyle` from an indentation string. /// Creates an `IndentStyle` from an indentation string.

@ -59,11 +59,11 @@ where
D: serde::Deserializer<'de>, D: serde::Deserializer<'de>,
{ {
usize::deserialize(deserializer).and_then(|n| { usize::deserialize(deserializer).and_then(|n| {
if n > 0 && n <= 16 { if n > 0 && n <= 64 {
Ok(n) Ok(n)
} else { } else {
Err(serde::de::Error::custom( Err(serde::de::Error::custom(
"tab width must be a value from 1 to 16 inclusive", "tab width must be a value from 1 to 64 inclusive",
)) ))
} }
}) })

Loading…
Cancel
Save