Skip to content

Commit 69a81f9

Browse files
committed
fix help and clippy
1 parent d5d2f5d commit 69a81f9

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

dsc_lib/src/discovery/command_discovery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ fn load_manifest(path: &Path) -> Result<DscResource, DscError> {
381381
};
382382

383383
if let Err(err) = validate_semver(&manifest.version) {
384-
return Err(DscError::Validation(format!("Invalid manifest {:?} version value: {err}", path)));
384+
return Err(DscError::Validation(format!("Invalid manifest {path:?} version value: {err}")));
385385
}
386386

387387
let kind = if let Some(kind) = manifest.kind.clone() {

dsc_lib/src/dscresources/resource_manifest.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ pub struct ResourceManifest {
2929
#[serde(skip_serializing_if = "Option::is_none")]
3030
pub kind: Option<Kind>,
3131
/// The version of the resource using semantic versioning.
32-
#[validate(custom(function = "validate_semver"))]
3332
pub version: String,
3433
/// The description of the resource.
3534
pub description: Option<String>,
@@ -251,11 +250,11 @@ pub fn import_manifest(manifest: Value) -> Result<ResourceManifest, DscError> {
251250
///
252251
/// # Returns
253252
///
254-
/// * `Result<(), ValidationError>` - The result of the validation.
253+
/// * `Result<(), Error>` - The result of the validation.
255254
///
256255
/// # Errors
257256
///
258-
/// * `DscError` - The version string is not a valid semantic version.
257+
/// * `Error` - The version string is not a valid semantic version.
259258
pub fn validate_semver(version: &str) -> Result<(), semver::Error> {
260259
Version::parse(version)?;
261260
Ok(())

0 commit comments

Comments
 (0)