From 3cfa8cd0f69f007b94516cf17fb8a62723d8555c Mon Sep 17 00:00:00 2001 From: Ted Mielczarek Date: Wed, 22 Apr 2020 14:06:53 -0400 Subject: [PATCH] Fix overeager find and replace usage --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 59eb7e1..9c63e67 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -71,7 +71,7 @@ impl Error { fn new_parse_error(s: Cow<'static, str>, input: &str, offset: usize) -> Error { let context = Cow::Borrowed(input.as_bytes().get(offset..).unwrap_or(&[])); let context = if context.len() > 20 { - Cow::Owned(format!("{}..=", String::from_utf8_lossy(&context[..20]))) + Cow::Owned(format!("{}...", String::from_utf8_lossy(&context[..20]))) } else { String::from_utf8_lossy(&context) }; @@ -767,7 +767,7 @@ impl<'a> ParserState<'a> { // ::= # when 1 <= Number <= 10 // ::= + @ # when Numbrer == 0 or >= 10 // - // ::= [A-P] # A = 0, B = 1, ..= + // ::= [A-P] # A = 0, B = 1, ... fn read_number(&mut self) -> Result { let neg = self.consume(b"?"); @@ -815,7 +815,7 @@ impl<'a> ParserState<'a> { } } - // First 10 strings can be referenced by special names ?0, ?1, ..=, ?9. + // First 10 strings can be referenced by special names ?0, ?1, ..., ?9. // Memorize it. fn memorize_name(&mut self, n: &Name<'a>) { // TODO: the contains check does an equality check on the Name enum, which @@ -1666,7 +1666,7 @@ impl<'a> Serializer<'a> { return Ok(()); } Type::VarArgs => { - write!(self.w, "..=")?; + write!(self.w, "...")?; return Ok(()); } Type::Ptr(ref inner, storage_class)