Skip to content

Commit

Permalink
fix ci error
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislearn committed Sep 4, 2023
1 parent 4b2a0be commit 67b2c3a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 59 deletions.
34 changes: 17 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["crates/*"]
resolver = "2"

[workspace.package]
version = "0.54.0"
version = "0.54.1"
authors = ["Chrislearn Young <chrislearn@hotmail.com>"]
edition = "2021"
rust-version = "1.67"
Expand Down Expand Up @@ -84,23 +84,23 @@ rustls = "0.21"
rustls-pemfile = "1"
rust-embed = {version = ">= 6, <= 8"}
salvo-utils = { version = "0.0.5", default-features = true }
salvo_macros = { version = "0.54.0", path = "crates/macros", default-features = false }
salvo_core = { version = "0.54.0", path = "crates/core", default-features = false }
salvo_extra = { version = "0.54.0", path = "crates/extra", default-features = false }
salvo-compression = { version = "0.54.0", path = "crates/compression", default-features = false }
salvo-cache = { version = "0.54.0", path = "crates/cache", default-features = false }
salvo-cors = { version = "0.54.0", path = "crates/cors", default-features = false }
salvo-csrf = { version = "0.54.0", path = "crates/csrf", default-features = false }
salvo-flash = { version = "0.54.0", path = "crates/flash", default-features = false }
salvo_macros = { version = "0.54.1", path = "crates/macros", default-features = false }
salvo_core = { version = "0.54.1", path = "crates/core", default-features = false }
salvo_extra = { version = "0.54.1", path = "crates/extra", default-features = false }
salvo-compression = { version = "0.54.1", path = "crates/compression", default-features = false }
salvo-cache = { version = "0.54.1", path = "crates/cache", default-features = false }
salvo-cors = { version = "0.54.1", path = "crates/cors", default-features = false }
salvo-csrf = { version = "0.54.1", path = "crates/csrf", default-features = false }
salvo-flash = { version = "0.54.1", path = "crates/flash", default-features = false }
salvo-http3 = { version = "0.0.4", default-features = false }
salvo-jwt-auth = { version = "0.54.0", path = "crates/jwt-auth", default-features = false }
salvo-oapi = { version = "0.54.0", path = "./crates/oapi", default-features = false }
salvo-oapi-macros = { version = "0.54.0", path = "crates/oapi-macros", default-features = false }
salvo-otel = { version = "0.54.0", path = "crates/otel", default-features = false }
salvo-proxy = { version = "0.54.0", path = "crates/proxy", default-features = false }
salvo-rate-limiter = { version = "0.54.0", path = "crates/rate-limiter", default-features = false }
salvo-serve-static = { version = "0.54.0", path = "crates/serve-static", default-features = false }
salvo-session = { version = "0.54.0", path = "crates/session", default-features = false }
salvo-jwt-auth = { version = "0.54.1", path = "crates/jwt-auth", default-features = false }
salvo-oapi = { version = "0.54.1", path = "./crates/oapi", default-features = false }
salvo-oapi-macros = { version = "0.54.1", path = "crates/oapi-macros", default-features = false }
salvo-otel = { version = "0.54.1", path = "crates/otel", default-features = false }
salvo-proxy = { version = "0.54.1", path = "crates/proxy", default-features = false }
salvo-rate-limiter = { version = "0.54.1", path = "crates/rate-limiter", default-features = false }
salvo-serve-static = { version = "0.54.1", path = "crates/serve-static", default-features = false }
salvo-session = { version = "0.54.1", path = "crates/session", default-features = false }
serde = "1"
serde_json = "1"
serde-xml-rs = "0.6"
Expand Down
43 changes: 1 addition & 42 deletions crates/oapi-macros/src/feature/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,45 +457,4 @@ impl Merge<Vec<Feature>> for Vec<Feature> {
self.append(&mut from);
self
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test_merge_with_empty_vec() {
let vec1 = vec![Feature::new("feature1"), Feature::new("feature2")];
let vec2 = vec![];
let merged = vec1.clone().merge(vec2.clone());
assert_eq!(merged, vec1);
let merged = vec2.clone().merge(vec1.clone());
assert_eq!(merged, vec1);
}

#[test]
fn test_merge_with_non_empty_vec() {
let vec1 = vec![Feature::new("feature1"), Feature::new("feature2")];
let vec2 = vec![Feature::new("feature3"), Feature::new("feature4")];
let merged = vec1.clone().merge(vec2.clone());
assert_eq!(
merged,
vec![
Feature::new("feature1"),
Feature::new("feature2"),
Feature::new("feature3"),
Feature::new("feature4")
]
);
let merged = vec2.clone().merge(vec1.clone());
assert_eq!(
merged,
vec![
Feature::new("feature3"),
Feature::new("feature4"),
Feature::new("feature1"),
Feature::new("feature2")
]
);
}
}
}

0 comments on commit 67b2c3a

Please sign in to comment.