Skip to content

Commit

Permalink
Fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
juntyr committed Sep 1, 2023
1 parent 1e8c29e commit bf32db9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,7 @@ impl<'a> Parser<'a> {
}

if (self.cursor.pre_ws_cursor + self.cursor.last_ws_len) < self.cursor.cursor {
// [[last whitespace] ... [bytese]] means the last whitespace
// is disjoint from this one and we need to reset the pre ws
// the last whitespace is disjoint from this one, we need to track a new one
self.cursor.pre_ws_cursor = self.cursor.cursor;
}

Expand All @@ -967,7 +966,7 @@ impl<'a> Parser<'a> {
}

pub fn has_unclosed_line_comment(&self) -> bool {
self.src.is_empty() && self.cursor.last_ws_len == usize::MAX
self.src().is_empty() && self.cursor.last_ws_len == usize::MAX
}

pub fn byte_string(&mut self) -> Result<ParsedByteStr<'a>> {
Expand Down Expand Up @@ -1277,7 +1276,7 @@ impl<'a> Parser<'a> {
'/' => {
let bytes = self.next_chars_while(|c| c != '\n');

let _ = self.advance(bytes);
self.advance(bytes);

if self.src().is_empty() {
Ok(Some(Comment::UnclosedLine))
Expand Down
4 changes: 2 additions & 2 deletions src/ser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -866,13 +866,13 @@ impl<'a, W: fmt::Write> ser::Serializer for &'a mut Serializer<W> {
self.implicit_some_depth = 0;

for _ in 0..implicit_some_depth {
self.output.write_all(b"Some(")?;
self.output.write_str("Some(")?;
}

guard_recursion! { self => value.serialize(raw::RawValueSerializer::new(self)) }?;

for _ in 0..implicit_some_depth {
self.output.write_all(b")")?;
self.output.write_str(")")?;
}

return Ok(());
Expand Down

0 comments on commit bf32db9

Please sign in to comment.