Skip to content

Commit 3ffad9d

Browse files
dak2claude
andcommitted
Remove doc comments that restate the code
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 2b3df5a commit 3ffad9d

2 files changed

Lines changed: 3 additions & 17 deletions

File tree

rust/ruby-rbs/src/environment/source.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use std::path::PathBuf;
22

33
use crate::ast::{Declaration, Directive};
44

5-
/// Where a loaded signature file came from, corresponding to the `source`
6-
/// values yielded by `RBS::EnvironmentLoader#each_dir`.
5+
/// Corresponds to the `source` values yielded by
6+
/// `RBS::EnvironmentLoader#each_dir`.
77
#[derive(Debug, Clone, PartialEq, Eq)]
88
pub enum SourceKind {
99
Core,
@@ -21,13 +21,11 @@ pub enum SourceKind {
2121

2222
impl SourceKind {
2323
/// Whether `_`-prefixed subdirectories are skipped while scanning.
24-
/// Only a user-specified [`SourceKind::Dir`] does not skip them.
2524
pub fn skips_hidden(&self) -> bool {
2625
!matches!(self, SourceKind::Dir { .. })
2726
}
2827
}
2928

30-
/// `RBS::Source::RBS` equivalent.
3129
#[derive(Debug)]
3230
pub struct Source {
3331
pub path: PathBuf,

rust/ruby-rbs/src/loader/mod.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ pub struct LoadedFile {
4444
pub kind: SourceKind,
4545
}
4646

47-
/// Enumerates core, library, and explicit signature directories, parses
48-
/// every `.rbs` file exactly once, and feeds the results into an
49-
/// [`Environment`], mirroring `RBS::EnvironmentLoader`.
47+
/// Mirrors `RBS::EnvironmentLoader`.
5048
///
5149
/// Unlike the Ruby implementation, this does not resolve gem names or
5250
/// versions to directories, and does not expand `manifest.yaml`
@@ -61,7 +59,6 @@ pub struct EnvironmentLoader {
6159
}
6260

6361
impl EnvironmentLoader {
64-
/// `core_root` is `None` to skip core.
6562
pub fn new(core_root: Option<PathBuf>) -> Self {
6663
EnvironmentLoader {
6764
core_root,
@@ -70,14 +67,11 @@ impl EnvironmentLoader {
7067
}
7168
}
7269

73-
/// Adds a library by name and its already-resolved signature directory.
7470
pub fn add_library(mut self, name: &str, path: PathBuf) -> Self {
7571
self.libs.push((name.to_string(), path));
7672
self
7773
}
7874

79-
/// Adds an explicit signature directory. Unlike libraries, `_`-prefixed
80-
/// subdirectories are not skipped.
8175
pub fn add_dir(mut self, path: PathBuf) -> Self {
8276
self.dirs.push(path);
8377
self
@@ -113,8 +107,6 @@ impl EnvironmentLoader {
113107
Ok(loaded)
114108
}
115109

116-
/// Groups directories core → libs → dirs, matching
117-
/// `RBS::EnvironmentLoader#each_dir`'s enumeration order.
118110
fn each_dir(&self) -> Vec<(SourceKind, PathBuf)> {
119111
let mut result = Vec::new();
120112

@@ -144,10 +136,6 @@ impl EnvironmentLoader {
144136
/// can later be parallelised by handing each worker its own [`Interners`].
145137
/// The parser's `SignatureNode` holds raw pointers and is not `Send`, so it
146138
/// must not escape this function — only the owned `Source` does.
147-
///
148-
/// Crate-private: a caller outside the crate has no way to merge its
149-
/// worker-local [`Interners`] into the environment, so the `Source` it
150-
/// produced would carry ids that environment cannot resolve.
151139
pub(crate) fn parse_one(
152140
path: &Path,
153141
kind: &SourceKind,

0 commit comments

Comments
 (0)