This commit is contained in:
chtenb 2024-11-20 17:18:16 -06:00 committed by GitHub
commit 17e0a406ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

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

View File

@ -59,11 +59,11 @@ fn deserialize_tab_width<'de, D>(deserializer: D) -> Result<usize, D::Error>
D: serde::Deserializer<'de>,
{
usize::deserialize(deserializer).and_then(|n| {
if n > 0 && n <= 16 {
if n > 0 && n <= 64 {
Ok(n)
} else {
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",
))
}
})