Skip to content

Commit 51dc597

Browse files
committed
Downgrade rstest
1 parent 717b2f5 commit 51dc597

File tree

6 files changed

+65
-84
lines changed

6 files changed

+65
-84
lines changed

Cargo.lock

Lines changed: 58 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ phf = { version = "0.13", optional = true }
1313

1414
[dev-dependencies]
1515
phf = { version = "0.13", features = ["macros"] }
16-
rstest = "0.26"
16+
rstest = "0.18"
1717

1818
[features]
1919
default = ["static-resolver"]

examples/const_example.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use desynt::{
44
use phf::{Map, phf_map};
55

66
// Custom mappings for application-specific types using PHF
7-
static CUSTOM_MAPPINGS: Map<&'static str, &'static str> = phf_map! {
7+
const CUSTOM_MAPPINGS: Map<&'static str, &'static str> = phf_map! {
88
// Web framework types
99
"actix_web::HttpResponse" => "HttpResponse",
1010
"axum::response::Response" => "Response",

examples/domain_specific.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use desynt::{DynamicPathResolver, PathResolver, create_static_resolver};
22
use phf::{Map, phf_map};
33

44
// Domain-specific type mappings for web applications
5-
static WEB_MAPPINGS: Map<&'static str, &'static str> = phf_map! {
5+
const WEB_MAPPINGS: Map<&'static str, &'static str> = phf_map! {
66
// HTTP and web frameworks
77
"actix_web::HttpRequest" => "Request",
88
"actix_web::HttpResponse" => "Response",
@@ -30,7 +30,7 @@ static WEB_MAPPINGS: Map<&'static str, &'static str> = phf_map! {
3030
};
3131

3232
// Database and persistence mappings
33-
static DATABASE_MAPPINGS: Map<&'static str, &'static str> = phf_map! {
33+
const DATABASE_MAPPINGS: Map<&'static str, &'static str> = phf_map! {
3434
// Database connections and pools
3535
"sqlx::Pool" => "DbPool",
3636
"sqlx::Connection" => "DbConnection",

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ impl PathResolver<EmptyStorage> {
946946
/// use desynt::{create_static_resolver, PathResolver};
947947
/// use phf::{phf_map, Map};
948948
///
949-
/// static CUSTOM_MAPPINGS: Map<&'static str, &'static str> = phf_map! {
949+
/// const CUSTOM_MAPPINGS: Map<&'static str, &'static str> = phf_map! {
950950
/// "actix_web::HttpResponse" => "HttpResponse",
951951
/// "serde_json::Value" => "JsonValue",
952952
/// };

tests/phf_storage.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ use rstest::rstest;
44
use syn::{Path, parse_str};
55

66
// Test PHF mappings
7-
static TEST_MAPPINGS: Map<&'static str, &'static str> = phf_map! {
7+
const EMPTY_MAPPINGS: Map<&'static str, &'static str> = phf_map! {};
8+
const TEST_MAPPINGS: Map<&'static str, &'static str> = phf_map! {
89
"custom::Type1" => "Type1",
910
"custom::Type2" => "Type2",
1011
"another::Custom" => "AnotherCustom",
@@ -27,7 +28,6 @@ fn static_resolver_basic() {
2728

2829
#[test]
2930
fn static_resolver_empty() {
30-
static EMPTY_MAPPINGS: Map<&'static str, &'static str> = phf_map! {};
3131
const RESOLVER: StaticPathResolver = create_static_resolver(&EMPTY_MAPPINGS, false);
3232

3333
assert_eq!(RESOLVER.len(), 0);
@@ -40,7 +40,6 @@ fn static_resolver_empty() {
4040

4141
#[test]
4242
fn static_resolver_with_primitives() {
43-
static EMPTY_MAPPINGS: Map<&'static str, &'static str> = phf_map! {};
4443
const RESOLVER: StaticPathResolver = create_static_resolver(&EMPTY_MAPPINGS, true);
4544

4645
assert_eq!(RESOLVER.len(), 74); // only primitives

0 commit comments

Comments
 (0)