We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edfb258 commit e0b3e8aCopy full SHA for e0b3e8a
1 file changed
rust/rubydex/src/test_utils/graph_test.rs
@@ -49,12 +49,20 @@ impl GraphTest {
49
}
50
51
/// Returns the normalized source for the given URI.
52
+ ///
53
+ /// # Panics
54
55
+ /// Panics if the URI has not been indexed.
56
#[must_use]
57
pub fn source(&self, uri: &str) -> &str {
58
self.sources.get(uri).expect("source not found for URI")
59
60
61
/// Returns the source text for a definition, sliced by its offset.
62
63
64
65
+ /// Panics if the definition or its document does not exist.
66
67
pub fn source_at(&self, definition_id: &DefinitionId) -> &str {
68
let def = self.graph.definitions().get(definition_id).unwrap();
0 commit comments