Skip to content

Commit eddc09a

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

4 files changed

Lines changed: 4 additions & 21 deletions

File tree

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

Lines changed: 2 additions & 5 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,
@@ -20,14 +20,11 @@ pub enum SourceKind {
2020
}
2121

2222
impl SourceKind {
23-
/// Whether `_`-prefixed subdirectories are skipped while scanning.
24-
/// Only a user-specified [`SourceKind::Dir`] does not skip them.
2523
pub fn skips_hidden(&self) -> bool {
2624
!matches!(self, SourceKind::Dir { .. })
2725
}
2826
}
2927

30-
/// `RBS::Source::RBS` equivalent.
3128
#[derive(Debug)]
3229
pub struct Source {
3330
pub path: PathBuf,

rust/ruby-rbs/src/file_finder.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use std::io;
22
use std::path::{Path, PathBuf};
33

4-
/// Enumerates `.rbs` entries under `path` in path-sorted order, mirroring
5-
/// `RBS::FileFinder.each_file` and its `Dir.glob` semantics.
4+
/// Mirrors `RBS::FileFinder.each_file` and its `Dir.glob` semantics.
65
///
76
/// Divergences: the sort compares the platform separator rather than
87
/// `/`-joined strings, and only `PermissionDenied`/`NotFound` are skipped

rust/ruby-rbs/src/interners.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use crate::interner::StringInterner;
22
use crate::type_name::TypeNameInterner;
33

4-
/// The pair of interners that an owned AST's ids refer to.
54
#[derive(Default)]
65
pub struct Interners {
76
pub strings: StringInterner,

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)