Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Take until newline
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Grund <jgrund@whamcloud.io>
  • Loading branch information
jgrund committed May 8, 2024
1 parent 1492e02 commit 821a79c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/quota/quota_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{
use combine::{
attempt, choice, eof,
error::{ParseError, StreamError},
many, one_of, optional,
optional,
parser::{
char::{alpha_num, newline, string},
repeat::take_until,
Expand Down Expand Up @@ -67,7 +67,7 @@ where
{
(
optional(newline()), // If quota stats are present, the whole yaml blob will start on a newline
many::<Vec<_>, _, _>(alpha_num().or(one_of("_-:".chars()))), // But yaml header might not be indented, ignore it
take_until::<Vec<_>, _, _>(newline()), // But yaml header might not be indented, ignore it
newline(),
take_until(attempt((newline(), alpha_num()).map(drop).or(eof()))),
)
Expand All @@ -85,7 +85,7 @@ where
{
(
optional(newline()), // If quota stats are present, the whole yaml blob will start on a newline
many::<Vec<_>, _, _>(alpha_num().or(one_of("_-:".chars()))), // But yaml header might not be indented, ignore it
take_until::<Vec<_>, _, _>(newline()), // But yaml header might not be indented, ignore it
newline(),
take_until(attempt((newline(), alpha_num()).map(drop).or(eof()))),
)
Expand Down

0 comments on commit 821a79c

Please sign in to comment.