shared-constant.snap•1.4 kB
---
/TEST_OUTPUT/workspace/src/another_consumer.rs
References in File: 2
At: L4:C48, L20:C50
1|// Another consumer module for testing references
2|use crate::helper::helper_function;
3|use crate::types::{
4| SharedInterface, SharedStruct, SharedType, SHARED_CONSTANT,
5|};
6|
7|pub fn another_consumer_function() {
8| // Use the helper function
9| let result = helper_function();
...
15|
16| // Use shared interface
17| let _iface: &dyn SharedInterface = &s;
18|
19| // Use shared constant
20| println!("Constant in another consumer: {}", SHARED_CONSTANT);
21|
22| // Use shared type
23| let _t: SharedType = String::from("another test");
24|}
---
/TEST_OUTPUT/workspace/src/consumer.rs
References in File: 2
At: L4:C48, L21:C30
1|// Consumer module for testing references
2|use crate::helper::helper_function;
3|use crate::types::{
4| SharedInterface, SharedStruct, SharedType, SHARED_CONSTANT,
5|};
6|
7|pub fn consumer_function() {
8| // Use the helper function
9| let result = helper_function();
...
16| // Use shared interface
17| let iface: &dyn SharedInterface = &s;
18| println!("Interface method: {}", iface.get_name());
19|
20| // Use shared constant
21| println!("Constant: {}", SHARED_CONSTANT);
22|
23| // Use shared type
24| let t: SharedType = String::from("test");
25| println!("Type: {}", t);
26|}