Skip to content

Commit 2ec64fa

Browse files
committed
up
1 parent 1428955 commit 2ec64fa

2 files changed

Lines changed: 23 additions & 16 deletions

File tree

crates/weaver_live_check/src/live_checker.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ impl LiveChecker {
6464
}
6565
}
6666
for attribute in &group.attributes {
67-
let attribute_rc =
68-
Rc::new(VersionedAttribute::V1(attribute.clone()));
67+
let attribute_rc = Rc::new(VersionedAttribute::V1(attribute.clone()));
6968
match attribute.r#type {
7069
AttributeType::Template(_) => {
7170
templates_by_length
@@ -509,7 +508,9 @@ mod tests {
509508
fn make_registry(use_v2: bool) -> VersionedRegistry {
510509
if use_v2 {
511510
VersionedRegistry::V2(Box::new(ForgeResolvedRegistry {
512-
schema_url: "https://example.com/schemas/1.2.3".try_into().expect("Should be valid schema url"),
511+
schema_url: "https://example.com/schemas/1.2.3"
512+
.try_into()
513+
.expect("Should be valid schema url"),
513514
registry: Registry {
514515
attributes: vec![
515516
V2Attribute {
@@ -795,7 +796,9 @@ mod tests {
795796
};
796797

797798
VersionedRegistry::V2(Box::new(ForgeResolvedRegistry {
798-
schema_url: "https://example.com/schemas/1.2.3".try_into().expect("Should be valid schema url"),
799+
schema_url: "https://example.com/schemas/1.2.3"
800+
.try_into()
801+
.expect("Should be valid schema url"),
799802
registry: Registry {
800803
attributes: vec![memory_state_attr.clone()],
801804
attribute_groups: vec![],
@@ -1003,7 +1006,9 @@ mod tests {
10031006
};
10041007

10051008
VersionedRegistry::V2(Box::new(ForgeResolvedRegistry {
1006-
schema_url: "https://example.com/schemas/1.2.3".try_into().expect("Should be valid schema url"),
1009+
schema_url: "https://example.com/schemas/1.2.3"
1010+
.try_into()
1011+
.expect("Should be valid schema url"),
10071012
registry: Registry {
10081013
attributes: vec![custom_string_attr.clone()],
10091014
attribute_groups: vec![],
@@ -1517,7 +1522,9 @@ mod tests {
15171522
};
15181523

15191524
VersionedRegistry::V2(Box::new(ForgeResolvedRegistry {
1520-
schema_url: "https://example.com/schemas/1.2.3".try_into().expect("Should be valid schema url"),
1525+
schema_url: "https://example.com/schemas/1.2.3"
1526+
.try_into()
1527+
.expect("Should be valid schema url"),
15211528
registry: Registry {
15221529
attributes: vec![session_id_attr.clone(), session_previous_id_attr.clone()],
15231530
attribute_groups: vec![],

crates/weaver_semconv/src/manifest.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ use crate::registry_repo::LEGACY_REGISTRY_MANIFEST;
1414
use crate::schema_url::SchemaUrl;
1515
use crate::stability::Stability;
1616
use crate::Error;
17-
use crate::Error::{InvalidRegistryManifest, LegacyRegistryManifest, RegistryManifestNotFound, DeprecatedSyntaxInRegistryManifest};
17+
use crate::Error::{
18+
DeprecatedSyntaxInRegistryManifest, InvalidRegistryManifest, LegacyRegistryManifest,
19+
RegistryManifestNotFound,
20+
};
1821
use schemars::JsonSchema;
1922
use serde::{Deserialize, Deserializer, Serialize};
2023
use weaver_common::vdir::VirtualDirectoryPath;
@@ -213,15 +216,12 @@ impl RegistryManifest {
213216
});
214217
}
215218

216-
nfes.extend(
217-
manifest
218-
.deserialization_warnings
219-
.iter()
220-
.map(|w| DeprecatedSyntaxInRegistryManifest {
221-
path: manifest_path_buf.clone(),
222-
error: w.clone(),
223-
}),
224-
);
219+
nfes.extend(manifest.deserialization_warnings.iter().map(|w| {
220+
DeprecatedSyntaxInRegistryManifest {
221+
path: manifest_path_buf.clone(),
222+
error: w.clone(),
223+
}
224+
}));
225225
Ok(manifest)
226226
}
227227

0 commit comments

Comments
 (0)