Skip to content

Commit 0380ca7

Browse files
authored
chore(doc): remove auto_impl (#8922)
1 parent ed3ed15 commit 0380ca7

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/doc/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ foundry-config.workspace = true
2020

2121
alloy-primitives.workspace = true
2222

23-
auto_impl.workspace = true
2423
derive_more.workspace = true
2524
eyre.workspace = true
2625
itertools.workspace = true

crates/doc/src/writer/as_doc.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use std::path::{Path, PathBuf};
1414
pub type AsDocResult = Result<String, std::fmt::Error>;
1515

1616
/// A trait for formatting a parse unit as documentation.
17-
#[auto_impl::auto_impl(&)]
1817
pub trait AsDoc {
1918
/// Formats a parse tree item into a doc string.
2019
fn as_doc(&self) -> AsDocResult;
@@ -224,7 +223,7 @@ impl AsDoc for Document {
224223
// TODO: cleanup
225224
// Write function docs
226225
writer.writeln_doc(
227-
item.comments.exclude_tags(&[CommentTag::Param, CommentTag::Return]),
226+
&item.comments.exclude_tags(&[CommentTag::Param, CommentTag::Return]),
228227
)?;
229228

230229
// Write function header
@@ -295,7 +294,7 @@ impl Document {
295294
writer.writeln()?;
296295

297296
// Write function docs
298-
writer.writeln_doc(comments.exclude_tags(&[CommentTag::Param, CommentTag::Return]))?;
297+
writer.writeln_doc(&comments.exclude_tags(&[CommentTag::Param, CommentTag::Return]))?;
299298

300299
// Write function header
301300
writer.write_code(code)?;

crates/doc/src/writer/buf_writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl BufWriter {
4343
}
4444

4545
/// Write [AsDoc] implementation to the buffer with newline.
46-
pub fn writeln_doc<T: AsDoc>(&mut self, doc: T) -> fmt::Result {
46+
pub fn writeln_doc<T: AsDoc>(&mut self, doc: &T) -> fmt::Result {
4747
writeln!(self.buf, "{}", doc.as_doc()?)
4848
}
4949

0 commit comments

Comments
 (0)