MCPcopy Create free account
hub / github.com/JamieMason/syncpack / make_instance

Function make_instance

src/disk_test.rs:668–681  ·  view source on GitHub ↗
(name: &str, dep_type: DependencyType, expected: &str)

Source from the content-addressed store, hash-verified

666 }
667
668 fn make_instance(name: &str, dep_type: DependencyType, expected: &str) -> Instance {
669 let specifier = Specifier::new(expected);
670 let descriptor = InstanceDescriptor {
671 dependency_type: std::rc::Rc::new(dep_type),
672 internal_name: name.to_string(),
673 is_local_dependency: false,
674 name: name.to_string(),
675 source_idx: SourceIdx(0),
676 specifier: Specifier::new("0.0.0"), // ignored — overridden by mark_fixable below
677 };
678 let instance = Instance::new(descriptor, "test-pkg", None, None);
679 instance.mark_fixable(FixableInstance::DiffersToHighestOrLowestSemver, &specifier);
680 instance
681 }
682
683 #[test]
684 fn serialize_uses_detected_2_space_indent() {

Calls 2

SourceIdxClass · 0.85
mark_fixableMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…