Skip to content

Commit e193efb

Browse files
committed
bump 0.4.1
1 parent 13236c5 commit e193efb

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Please check your PR title with the below requirements:
2323
-->
2424
- [ ] This PR title match the format: \<type\>(optional scope): \<description\>
2525
- [ ] The description of this PR title is user-oriented and clear enough for others to understand.
26-
- [ ] Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. [User docs repo](https://github.com/cloudwego/cloudwego.github.io)
26+
- [ ] Attach the PR updating the user documentation if the current PR requires user awareness at the usage level.
2727

2828

2929
#### (Optional) Translate the PR title into Chinese.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ license = "Apache-2.0"
1010
name = "sonic-rs"
1111
readme = "README.md"
1212
repository = "https://github.com/cloudwego/sonic-rs"
13-
version = "0.4.0"
13+
version = "0.4.1"
1414

1515
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1616

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl Error {
306306
pub(crate) fn syntax(code: ErrorCode, json: &[u8], index: usize) -> Self {
307307
let position = Position::from_index(index, json);
308308
// generate descript about 16 characters
309-
let mut start = if index < 8 { 0 } else { index - 8 };
309+
let mut start = index.saturating_sub(8);
310310
let mut end = if index + 8 > json.len() {
311311
json.len()
312312
} else {

src/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use crate::{
3535
unicode::{codepoint_to_utf8, hex_to_u32_nocheck},
3636
},
3737
value::{node::RawStr, visitor::JsonVisitor},
38-
JsonValueMutTrait, JsonValueTrait, LazyValue, Number, OwnedLazyValue, RawNumber, Read,
38+
JsonValueMutTrait, JsonValueTrait, LazyValue, Number, OwnedLazyValue,
3939
};
4040

4141
// support borrow for owned deserizlie or skip

src/reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ mod test {
411411
use crate::{Deserialize, Deserializer};
412412
fn test_peek() {
413413
let data = b"1234567890";
414-
let mut reader = Read::new(data, false);
414+
let reader = Read::new(data, false);
415415
assert_eq!(reader.peek(), Some(b'1'));
416416
assert_eq!(reader.peek_n(4).unwrap(), &b"1234"[..]);
417417
}

0 commit comments

Comments
 (0)