pub fn collect_import_from_member<'a>(
level: u32,
module: Option<&'a str>,
member: &'a str,
) -> QualifiedName<'a>Expand description
Format the call path for a relative import.
ยงExamples
assert_eq!(collect_import_from_member(0, None, "bar").segments(), ["bar"]);
assert_eq!(collect_import_from_member(1, None, "bar").segments(), [".", "bar"]);
assert_eq!(collect_import_from_member(1, Some("foo"), "bar").segments(), [".", "foo", "bar"]);