Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
sunli829 committed Sep 13, 2024
2 parents 5fc45f2 + f81424d commit 3de57f8
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rust-version = "1.75"
[workspace.dependencies]
poem = { path = "poem", version = "3.1.0", default-features = false }
poem-derive = { path = "poem-derive", version = "3.1.0" }
poem-openapi-derive = { path = "poem-openapi-derive", version = "5.1.0" }
poem-openapi-derive = { path = "poem-openapi-derive", version = "5.1.1" }
poem-grpc-build = { path = "poem-grpc-build", version = "0.5.0" }

proc-macro-crate = "3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/poem/redis-session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish.workspace = true
poem = { workspace = true, features = ["redis-session"] }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
tracing-subscriber.workspace = true
redis = { version = "0.26.0", features = [
redis = { version = "0.27", features = [
"aio",
"tokio-comp",
"connection-manager",
Expand Down
2 changes: 1 addition & 1 deletion poem-openapi-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "poem-openapi-derive"
version = "5.1.0"
version = "5.1.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
4 changes: 4 additions & 0 deletions poem-openapi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- implements `Serialize` and `Deserialize` for `poem_openapi::types::Any<T>`.

# [5.1.1] 2024-09-13

- fix [#883](https://github.com/poem-web/poem/issues/883)

# [5.1.0] 2024-09-08

- fix read_only_with_default test when only default features are enabled [#854](https://github.com/poem-web/poem/pulls)
Expand Down
2 changes: 1 addition & 1 deletion poem-openapi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "poem-openapi"
version = "5.1.0"
version = "5.1.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion poem-openapi/src/types/external/bson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl ParseFromMultipartField for ObjectId {

impl ToJSON for ObjectId {
fn to_json(&self) -> Option<Value> {
Some(serde_json::to_value(self).unwrap())
serde_json::to_value(self).ok()
}
}

Expand Down
2 changes: 1 addition & 1 deletion poem-openapi/src/types/external/floats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ macro_rules! impl_type_for_floats {

impl ToJSON for $ty {
fn to_json(&self) -> Option<Value> {
Some(Value::Number(Number::from_f64(*self as f64).unwrap()))
Number::from_f64(*self as f64).map(Value::Number)
}
}

Expand Down
4 changes: 2 additions & 2 deletions poem-openapi/src/types/external/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl ParseFromMultipartField for OffsetDateTime {

impl ToJSON for OffsetDateTime {
fn to_json(&self) -> Option<Value> {
Some(Value::String(self.format(&Rfc3339).unwrap_or_default()))
self.format(&Rfc3339).ok().map(Value::String)
}
}

Expand Down Expand Up @@ -129,7 +129,7 @@ macro_rules! impl_naive_datetime_types {

impl ToJSON for $ty {
fn to_json(&self) -> Option<Value> {
Some(Value::String(self.format($format_description).unwrap()))
self.format($format_description).ok().map(Value::String)
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion poem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# [3.1.0] 2024-09-28
# [3.1.0] 2024-09-08

- build(deps): update nix requirement from 0.28.0 to 0.29.0 [#851](https://github.com/poem-web/poem/pull/851)
- Add manual `Default` implementation for `#[handler]` [#848](https://github.com/poem-web/poem/pull/848)
Expand Down
2 changes: 1 addition & 1 deletion poem/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ chrono = { workspace = true, optional = true, default-features = false, features
time = { version = "0.3", optional = true }
mime_guess = { version = "2.0.3", optional = true }
rand = { version = "0.8.4", optional = true }
redis = { version = "0.26.0", optional = true, features = [
redis = { version = "0.27", optional = true, features = [
"aio",
"tokio-comp",
"connection-manager",
Expand Down

0 comments on commit 3de57f8

Please sign in to comment.