Skip to content

Commit 7c1734d

Browse files
bors[bot]japaric
andauthored
Merge #20
20: fix warnings; bump heapless; add crate status r=japaric a=japaric closes #19 Co-authored-by: Jorge Aparicio <jorge@japaric.io>
2 parents f2481c1 + 0f0fe3b commit 7c1734d

File tree

7 files changed

+37
-22
lines changed

7 files changed

+37
-22
lines changed

Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ license = "MIT OR Apache-2.0"
99
name = "serde-json-core"
1010
readme = "README.md"
1111
repository = "https://japaric.github.io/serde-json-core/serde_json_core"
12-
version = "0.0.1"
12+
version = "0.1.0"
1313

1414
[dependencies]
15-
heapless = "0.4.0"
15+
heapless = "0.5.0"
1616

1717
[dependencies.serde]
1818
default-features = false
@@ -22,4 +22,7 @@ version = "1.0.80"
2222
serde_derive = "1.0.80"
2323

2424
[features]
25-
std = ["serde/std"]
25+
std = ["serde/std"]
26+
27+
[badges]
28+
maintenance = { status = "looking-for-maintainer" }

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
55
[`serde-json`]: https://crates.io/crates/serde_json
66

7+
# Status
8+
9+
This crate is currently being passively maintained by [@japaric]. I (@japaric)
10+
will be merging PRs (bug fixes and features) as they appear without any
11+
long-term / design consideration. If you would like to take over the steering
12+
wheel (i.e. take ownership of this crate) send me an e-mail (see my GitHub
13+
profile).
14+
15+
[@japaric]: https://github.com/japaric
16+
717
## [Documentation](https://japaric.github.io/serde-json-core/serde_json_core)
818

919
## License

src/de/enum_.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ use serde::de;
22

33
use crate::de::{Deserializer, Error, Result};
44

5-
pub(crate) struct UnitVariantAccess<'a, 'b>
6-
where
7-
'b: 'a,
8-
{
5+
pub(crate) struct UnitVariantAccess<'a, 'b> {
96
de: &'a mut Deserializer<'b>,
107
}
118

src/de/map.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ use serde::de::{self, Visitor};
22

33
use crate::de::{Deserializer, Error};
44

5-
pub struct MapAccess<'a, 'b>
6-
where
7-
'b: 'a,
8-
{
5+
pub struct MapAccess<'a, 'b> {
96
de: &'a mut Deserializer<'b>,
107
first: bool,
118
}
@@ -60,10 +57,7 @@ impl<'a, 'de> de::MapAccess<'de> for MapAccess<'a, 'de> {
6057
}
6158
}
6259

63-
struct MapKey<'a, 'b>
64-
where
65-
'b: 'a,
66-
{
60+
struct MapKey<'a, 'b> {
6761
de: &'a mut Deserializer<'b>,
6862
}
6963

src/de/seq.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ use serde::de;
22

33
use crate::de::{Deserializer, Error, Result};
44

5-
pub(crate) struct SeqAccess<'a, 'b>
6-
where
7-
'b: 'a,
8-
{
5+
pub(crate) struct SeqAccess<'a, 'b> {
96
first: bool,
107
de: &'a mut Deserializer<'b>,
118
}

src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
//! This version of [`serde-json`] is aimed at applications that run on resource constrained
66
//! devices.
77
//!
8+
//! # Status
9+
//!
10+
//! This crate is currently being passively maintained by [@japaric]. I (@japaric) will be merging
11+
//! PRs (bug fixes and features) as they appear without any long-term / design consideration. If you
12+
//! would like to take over the steering wheel (i.e. take ownership of this crate) send me an e-mail
13+
//! (see my GitHub profile).
14+
//!
15+
//! [@japaric]: https://github.com/japaric
16+
//!
817
//! # Current features
918
//!
1019
//! - The error type is a simple C like enum (less overhead, smaller memory footprint)
@@ -66,3 +75,8 @@ pub mod ser;
6675
pub use self::de::{from_slice, from_str};
6776
#[doc(inline)]
6877
pub use self::ser::{to_string, to_vec};
78+
79+
#[allow(deprecated)]
80+
unsafe fn uninitialized<T>() -> T {
81+
core::mem::uninitialized()
82+
}

src/ser/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Serialize a Rust data structure into JSON data
22
3-
use core::{fmt, mem};
3+
use core::fmt;
44

55
use serde::ser;
66

@@ -69,7 +69,7 @@ where
6969
// which take 200+ bytes of ROM / Flash
7070
macro_rules! serialize_unsigned {
7171
($self:ident, $N:expr, $v:expr) => {{
72-
let mut buf: [u8; $N] = unsafe { mem::uninitialized() };
72+
let mut buf: [u8; $N] = unsafe { super::uninitialized() };
7373

7474
let mut v = $v;
7575
let mut i = $N - 1;
@@ -100,7 +100,7 @@ macro_rules! serialize_signed {
100100
(false, v as $uxx)
101101
};
102102

103-
let mut buf: [u8; $N] = unsafe { mem::uninitialized() };
103+
let mut buf: [u8; $N] = unsafe { super::uninitialized() };
104104
let mut i = $N - 1;
105105
loop {
106106
buf[i] = (v % 10) as u8 + b'0';

0 commit comments

Comments
 (0)