-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow documentation at mock
macro
#100
Comments
MOZGIII
added a commit
to pubnub/rust
that referenced
this issue
Feb 15, 2020
MOZGIII
added a commit
to pubnub/rust
that referenced
this issue
Feb 15, 2020
MOZGIII
added a commit
to pubnub/rust
that referenced
this issue
Feb 15, 2020
MOZGIII
added a commit
to pubnub/rust
that referenced
this issue
Feb 15, 2020
Yeah, I can probably make this work. Could you please provide a short example of what you want to do? |
#![deny(missing_docs)]
// This code fails the missing docs check, simply put I want it to pass:
mock! {
/// The mock for a `Trasport` interface. Use `MockTransport::new()` to create new mock.
pub Transport {
/// ...
fn publish_request(
&self,
request: request::Publish,
) -> BoxFuture<'static, Result<Timetoken, MockTransportError>> {}
/// ...
fn subscribe_request(
&self,
request: request::Subscribe,
) -> BoxFuture<'static, Result<(Vec<Message>, Timetoken), MockTransportError>> {}
}
trait Clone {
fn clone(&self) -> Self {}
}
} Just for clarity, in this example, the "main" |
asomers
added a commit
that referenced
this issue
Feb 20, 2020
Previously, the build would fail if the mock struct line contained a doc comment. Now, the build will pass, and doc comments on the struct and methods will be propagated to the generated code. Fixes #100
@MOZGIII try the linked PR. Let me know if it fixes your problem. |
asomers
added a commit
that referenced
this issue
Feb 20, 2020
Previously, the build would fail if the mock struct line contained a doc comment. Now, the build will pass, and doc comments on the struct and methods will be propagated to the generated code. Fixes #100
MOZGIII
added a commit
to pubnub/rust
that referenced
this issue
Feb 21, 2020
asomers
added a commit
that referenced
this issue
Mar 11, 2020
Previously, the build would fail if the mock struct line contained a doc comment. Now, the build will pass, and doc comments on the struct and methods will be propagated to the generated code. Fixes #100
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code produced by the
mock!
macro cannot be documented right now, but we would like to expose our mocks to the public and provide the documentation for them.Can you please add support for documentation?
The text was updated successfully, but these errors were encountered: