Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Fix more missing doc warnings #416

Merged
merged 8 commits into from
Nov 17, 2020
Merged

Fix more missing doc warnings #416

merged 8 commits into from
Nov 17, 2020

Conversation

niklaslong
Copy link
Member

Follow up to #409 and part of #197.

@niklaslong niklaslong changed the title Fix more missing doc warnings (WIP): Fix more missing doc warnings Oct 16, 2020
@niklaslong niklaslong force-pushed the 197-docs branch 2 times, most recently from 94044c2 to 6823194 Compare October 21, 2020 07:54
Copy link
Member Author

@niklaslong niklaslong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koivunej This should be mostly ready—I've left some comments for things that I'm unsure of. There are still some 80 (down from 150+) warnings, though I wanted to keep these PRs fairly small given they affect many parts of the codebase.

src/repo/mem.rs Show resolved Hide resolved
src/repo/mod.rs Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
@niklaslong niklaslong changed the title (WIP): Fix more missing doc warnings Fix more missing doc warnings Oct 21, 2020
Copy link
Collaborator

@koivunej koivunej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is looking really great! Also thanks for the good questions. I left at least one TBD but I think we should start merging this today-ish.

src/dag.rs Outdated
Comment on lines 168 to 171
/// Creates a new `IpldDag` for DAG operations.
pub fn new(ipfs: Ipfs<Types>) -> Self {
IpldDag { ipfs }
}
Copy link
Collaborator

@koivunej koivunej Nov 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels a bit like an oversight for anyone having to write or read an "MSDN style" piece of documentation.

Looking that

rust-ipfs/src/lib.rs

Lines 387 to 389 in 3fc24b0

pub fn dag(&self) -> IpldDag<Types> {
IpldDag::new(self.clone())
}
exists I am thinking this might be accidentially pub fn. While the current API is of course far from perfect, perhaps I'd like to suggest this:

Suggested change
/// Creates a new `IpldDag` for DAG operations.
pub fn new(ipfs: Ipfs<Types>) -> Self {
IpldDag { ipfs }
}
/// Creates a new `IpldDag` for DAG operations.
// FIXME: duplicates Ipfs::dag(), having both is redundant
pub fn new(ipfs: Ipfs<Types>) -> Self {
IpldDag { ipfs }
}

src/lib.rs Show resolved Hide resolved
src/repo/mem.rs Show resolved Hide resolved
src/repo/mod.rs Show resolved Hide resolved
@niklaslong niklaslong marked this pull request as ready for review November 17, 2020 15:21
Copy link
Collaborator

@koivunej koivunej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking really good!

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 17, 2020

Build succeeded:

@bors bors bot merged commit 75ed11a into rs-ipfs:master Nov 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants