Skip to content

Commit 1411491

Browse files
authored
Fix Tests (#5)
1 parent d9d2589 commit 1411491

File tree

12 files changed

+26
-26
lines changed

12 files changed

+26
-26
lines changed

crates/target_rust/docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.49
1+
FROM rust:1.67
22

33
ARG MAIN
44

crates/target_rust/output/discriminator_optional_properties/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ pub enum Root {
1313
pub struct RootBar {
1414
#[serde(rename = "baz")]
1515
#[serde(skip_serializing_if = "Option::is_none")]
16-
pub baz: Option<Box<Vec<String>>>,
16+
pub baz: Option<Vec<String>>,
1717

1818
#[serde(rename = "quux")]
1919
#[serde(skip_serializing_if = "Option::is_none")]
20-
pub quux: Option<Box<bool>>,
20+
pub quux: Option<bool>,
2121
}

crates/target_rust/output/geojson/mod.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
44
use serde_json::Value;
55
use std::collections::HashMap;
66

7-
pub type Root = GeojsonObject;
7+
pub type Root = Box<GeojsonObject>;
88

99
/// A GeoJSON object MAY have a member named "bbox" to include information
1010
/// on the coordinate range for its Geometries, Features, or
@@ -165,7 +165,7 @@ pub struct GeojsonObjectFeature {
165165
#[derive(Serialize, Deserialize)]
166166
pub struct GeojsonObjectFeatureCollection {
167167
#[serde(rename = "features")]
168-
pub features: Vec<GeojsonObject>,
168+
pub features: Vec<Box<GeojsonObject>>,
169169
}
170170

171171
/// A GeoJSON object with type "GeometryCollection" is a Geometry
@@ -198,11 +198,11 @@ pub struct GeojsonObjectFeatureCollection {
198198
#[derive(Serialize, Deserialize)]
199199
pub struct GeojsonObjectGeometryCollection {
200200
#[serde(rename = "geometries")]
201-
pub geometries: Vec<GeojsonObject>,
201+
pub geometries: Vec<Box<GeojsonObject>>,
202202

203203
#[serde(rename = "bbox")]
204204
#[serde(skip_serializing_if = "Option::is_none")]
205-
pub bbox: Option<Box<BoundingBox>>,
205+
pub bbox: Option<BoundingBox>,
206206
}
207207

208208
/// For type "LineString", the "coordinates" member is an array of two
@@ -214,7 +214,7 @@ pub struct GeojsonObjectLineString {
214214

215215
#[serde(rename = "bbox")]
216216
#[serde(skip_serializing_if = "Option::is_none")]
217-
pub bbox: Option<Box<BoundingBox>>,
217+
pub bbox: Option<BoundingBox>,
218218
}
219219

220220
/// For type "MultiLineString", the "coordinates" member is an array of
@@ -226,7 +226,7 @@ pub struct GeojsonObjectMultiLineString {
226226

227227
#[serde(rename = "bbox")]
228228
#[serde(skip_serializing_if = "Option::is_none")]
229-
pub bbox: Option<Box<BoundingBox>>,
229+
pub bbox: Option<BoundingBox>,
230230
}
231231

232232
/// For type "MultiPoint", the "coordinates" member is an array of
@@ -238,7 +238,7 @@ pub struct GeojsonObjectMultiPoint {
238238

239239
#[serde(rename = "bbox")]
240240
#[serde(skip_serializing_if = "Option::is_none")]
241-
pub bbox: Option<Box<BoundingBox>>,
241+
pub bbox: Option<BoundingBox>,
242242
}
243243

244244
/// For type "MultiPolygon", the "coordinates" member is an array of
@@ -250,7 +250,7 @@ pub struct GeojsonObjectMultiPolygon {
250250

251251
#[serde(rename = "bbox")]
252252
#[serde(skip_serializing_if = "Option::is_none")]
253-
pub bbox: Option<Box<BoundingBox>>,
253+
pub bbox: Option<BoundingBox>,
254254
}
255255

256256
/// For type "Point", the "coordinates" member is a single position.
@@ -261,7 +261,7 @@ pub struct GeojsonObjectPoint {
261261

262262
#[serde(rename = "bbox")]
263263
#[serde(skip_serializing_if = "Option::is_none")]
264-
pub bbox: Option<Box<BoundingBox>>,
264+
pub bbox: Option<BoundingBox>,
265265
}
266266

267267
/// For type "Polygon", the "coordinates" member MUST be an array of
@@ -273,7 +273,7 @@ pub struct GeojsonObjectPolygon {
273273

274274
#[serde(rename = "bbox")]
275275
#[serde(skip_serializing_if = "Option::is_none")]
276-
pub bbox: Option<Box<BoundingBox>>,
276+
pub bbox: Option<BoundingBox>,
277277
}
278278

279279
/// To specify a constraint specific to Polygons, it is useful to

crates/target_rust/output/nullable_discriminator/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ pub struct RootQuux {
2424
pub quuz: String,
2525
}
2626

27-
pub type Root = Option<Box<Root0>>;
27+
pub type Root = Option<Root0>;
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Code generated by jtd-codegen for Rust v0.2.1
22

3-
pub type Root = Option<Box<Vec<String>>>;
3+
pub type Root = Option<Vec<String>>;

crates/target_rust/output/nullable_enum/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ pub enum Root0 {
1414
Foo,
1515
}
1616

17-
pub type Root = Option<Box<Root0>>;
17+
pub type Root = Option<Root0>;

crates/target_rust/output/nullable_properties/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ pub struct Root0 {
1717
pub quux: Vec<bool>,
1818
}
1919

20-
pub type Root = Option<Box<Root0>>;
20+
pub type Root = Option<Root0>;

crates/target_rust/output/nullable_references/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ pub type NotnullRefNullString = NullString;
2929

3030
pub type NotnullString = String;
3131

32-
pub type NullRefNotnullString = Option<Box<NotnullString>>;
32+
pub type NullRefNotnullString = Option<NotnullString>;
3333

34-
pub type NullRefNullString = Option<Box<NullString>>;
34+
pub type NullRefNullString = Option<NullString>;
3535

36-
pub type NullString = Option<Box<String>>;
36+
pub type NullString = Option<String>;

crates/target_rust/output/nullable_timestamp_property/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ use serde::{Deserialize, Serialize};
66
#[derive(Serialize, Deserialize)]
77
pub struct Root {
88
#[serde(rename = "foo")]
9-
pub foo: Option<Box<DateTime<FixedOffset>>>,
9+
pub foo: Option<DateTime<FixedOffset>>,
1010
}

crates/target_rust/output/optional_properties/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ use serde::{Deserialize, Serialize};
66
pub struct Root {
77
#[serde(rename = "bar")]
88
#[serde(skip_serializing_if = "Option::is_none")]
9-
pub bar: Option<Box<Vec<String>>>,
9+
pub bar: Option<Vec<String>>,
1010

1111
#[serde(rename = "baz")]
1212
#[serde(skip_serializing_if = "Option::is_none")]
13-
pub baz: Option<Box<bool>>,
13+
pub baz: Option<bool>,
1414

1515
#[serde(rename = "foo")]
1616
#[serde(skip_serializing_if = "Option::is_none")]
17-
pub foo: Option<Box<String>>,
17+
pub foo: Option<String>,
1818
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Code generated by jtd-codegen for Rust v0.2.1
22

3-
pub type Root = Option<Box<String>>;
3+
pub type Root = Option<String>;

crates/target_rust/output/root_nullable_timestamp/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
use chrono::{DateTime, FixedOffset};
44

5-
pub type Root = Option<Box<DateTime<FixedOffset>>>;
5+
pub type Root = Option<DateTime<FixedOffset>>;

0 commit comments

Comments
 (0)