v0.1.3-pre.011-fix.001
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
# file: Cargo.toml
|
# file: Cargo.toml
|
||||||
# version: 54
|
# version: 55
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "3"
|
resolver = "3"
|
||||||
members = ["crates/ksp-config-lib", "crates/ksp-core-lib", "crates/ksp-logging-lib"]
|
members = ["crates/ksp-config-lib", "crates/ksp-core-lib", "crates/ksp-logging-lib"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.1.3-pre.11"
|
version = "0.1.3-pre.11.fix.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project"
|
repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: crates/ksp-config-lib/unit_tests/environment.rs
|
// file: crates/ksp-config-lib/unit_tests/environment.rs
|
||||||
// version: 3
|
// version: 4
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn process_environment_wins_over_dotenv_and_fallback_even_when_empty() {
|
fn process_environment_wins_over_dotenv_and_fallback_even_when_empty() {
|
||||||
@@ -356,7 +356,7 @@ fn detailed_profile_environment_keeps_global_origin_and_adds_environment_provena
|
|||||||
assert_eq!(effective.value()["logs_directory"], serde_json::Value::String("logs".to_owned()));
|
assert_eq!(effective.value()["logs_directory"], serde_json::Value::String("logs".to_owned()));
|
||||||
assert_eq!(effective.safe_value()["logs_directory"], serde_json::Value::String("logs".to_owned()));
|
assert_eq!(effective.safe_value()["logs_directory"], serde_json::Value::String("logs".to_owned()));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
effective.provenance_at("/logs_directory").and_then(|items| items.last()).and_then(crate::ConfigValueProvenance::variable_name),
|
effective.provenance_at("/logs_directory").and_then(|items| return items.last()).and_then(crate::ConfigValueProvenance::variable_name),
|
||||||
std::option::Option::Some("KSP_LOGS_DIRECTORY"),
|
std::option::Option::Some("KSP_LOGS_DIRECTORY"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
42
deltas/0.1.3/pre.011-fix.001.md
Normal file
42
deltas/0.1.3/pre.011-fix.001.md
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<!-- file: deltas/0.1.3/pre.011-fix.001.md -->
|
||||||
|
<!-- version: 1 -->
|
||||||
|
|
||||||
|
# 0.1.3-pre.011-fix.001 — Clippy test closure fix
|
||||||
|
|
||||||
|
## Objectif
|
||||||
|
|
||||||
|
Corriger l'unique erreur Clippy observée après validation de `0.1.3-pre.011`, sans modifier le comportement fonctionnel de `ksp-config-lib`.
|
||||||
|
|
||||||
|
## Correction
|
||||||
|
|
||||||
|
Le test `detailed_profile_environment_keeps_global_origin_and_adds_environment_provenance` utilisait une closure avec retour implicite :
|
||||||
|
|
||||||
|
```rust
|
||||||
|
.and_then(|items| items.last())
|
||||||
|
```
|
||||||
|
|
||||||
|
Le workspace impose `clippy::implicit_return = "deny"`. La closure utilise désormais un `return` explicite :
|
||||||
|
|
||||||
|
```rust
|
||||||
|
.and_then(|items| return items.last())
|
||||||
|
```
|
||||||
|
|
||||||
|
## Impact
|
||||||
|
|
||||||
|
- aucun changement du resolver d'environnement ;
|
||||||
|
- aucun changement de la classification `Public` / `Internal` / `Secret` ;
|
||||||
|
- aucun changement de redaction, provenance ou représentation sûre ;
|
||||||
|
- aucune nouvelle dépendance ;
|
||||||
|
- aucun changement de fichier Config, schema ou `.env.example` ;
|
||||||
|
- signal Cargo mis à jour vers `0.1.3-pre.11.fix.1`.
|
||||||
|
|
||||||
|
## Validation attendue
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo fmt --all
|
||||||
|
cargo check --workspace
|
||||||
|
cargo clippy --workspace --all-targets
|
||||||
|
cargo test --workspace
|
||||||
|
```
|
||||||
|
|
||||||
|
`0.1.3-pre.011` avait déjà passé les 61 tests unitaires Config et les 9 tests d'API publique ; ce fix vise uniquement la conformité Clippy.
|
||||||
Reference in New Issue
Block a user